Fix possible double free during sending network error messages.
authorWilfried Goesgens <dothebart@citadel.org>
Sat, 31 Aug 2013 18:57:16 +0000 (20:57 +0200)
committerWilfried Goesgens <dothebart@citadel.org>
Sat, 31 Aug 2013 18:57:16 +0000 (20:57 +0200)
citadel/modules/network/serv_network.c

index 254a01a..95d5b51 100644 (file)
@@ -388,10 +388,12 @@ void network_bounce(struct CtdlMessage *msg, char *reason)
         */
        if (msg->cm_fields['R'] == NULL) {
                free(msg->cm_fields['R']);
+               msg->cm_fields['R'] = NULL;
        }
 
        if (msg->cm_fields['D'] == NULL) {
                free(msg->cm_fields['D']);
+               msg->cm_fields['D'] = NULL;
        }
 
        snprintf(recipient, sizeof recipient, "%s@%s",