projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
VCARD: in case of OOM, don't loose more memory.
[citadel.git]
/
libcitadel
/
lib
/
vcard.c
diff --git
a/libcitadel/lib/vcard.c
b/libcitadel/lib/vcard.c
index 8c0c79d1ca37a9ea391857e57c9970eb5fa78dbd..3264774d7405ac6274f0896ed1ff7635d792290b 100644
(file)
--- 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)) {