projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e68d2da
)
Fixed a small bug in serv_vcard.c that could leave the cm_fields['E']
author
Dave West
<davew@uncensored.citadel.org>
Wed, 13 Feb 2008 21:33:37 +0000
(21:33 +0000)
committer
Dave West
<davew@uncensored.citadel.org>
Wed, 13 Feb 2008 21:33:37 +0000
(21:33 +0000)
initialised to an invalid pointer.
citadel/modules/vcard/serv_vcard.c
patch
|
blob
|
history
diff --git
a/citadel/modules/vcard/serv_vcard.c
b/citadel/modules/vcard/serv_vcard.c
index 8458670ad9f7875a059154ee54a53c57fb0dba8c..d4ab858b9407d8fb45695801648228dac5fad73b 100644
(file)
--- a/
citadel/modules/vcard/serv_vcard.c
+++ b/
citadel/modules/vcard/serv_vcard.c
@@
-610,7
+610,11
@@
int vcard_upload_beforesave(struct CtdlMessage *msg) {
/*
* Set the EUID of the message to the UID of the vCard.
*/
- if (msg->cm_fields['E'] != NULL) free(msg->cm_fields['E']);
+ if (msg->cm_fields['E'] != NULL)
+ {
+ free(msg->cm_fields['E']);
+ msg->cm_fields['E'] = NULL;
+ }
s = vcard_get_prop(v, "UID", 0, 0, 0);
if (s != NULL) {
msg->cm_fields['E'] = strdup(s);