From: Dave West Date: Wed, 13 Feb 2008 21:33:37 +0000 (+0000) Subject: Fixed a small bug in serv_vcard.c that could leave the cm_fields['E'] X-Git-Tag: v7.86~2483 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=b0c4961901a5822d831613e6cc8a24b10d1a4746 Fixed a small bug in serv_vcard.c that could leave the cm_fields['E'] initialised to an invalid pointer. --- diff --git a/citadel/modules/vcard/serv_vcard.c b/citadel/modules/vcard/serv_vcard.c index 8458670ad..d4ab858b9 100644 --- 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);