From: Wilfried Goesgens Date: Sun, 21 Oct 2012 20:43:55 +0000 (+0200) Subject: VCARD: in case of OOM, don't loose more memory. X-Git-Tag: v8.20~213 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=9a1d6fa0b9deb6624a05f83a1349c55f5c0bdab1 VCARD: in case of OOM, don't loose more memory. --- diff --git a/libcitadel/lib/vcard.c b/libcitadel/lib/vcard.c index 8c0c79d1c..3264774d7 100644 --- a/libcitadel/lib/vcard.c +++ b/libcitadel/lib/vcard.c @@ -138,7 +138,11 @@ struct vCard *vcard_load(char *vtext) { } v = vcard_new(); - if (v == NULL) return v; + if (v == NULL) + { + free(mycopy); + return v; + } ptr = mycopy; while (!IsEmptyStr(ptr)) {