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 254a01a28c46c748a543cdc4f23cbcf815c59277..95d5b51e7021f1202d06519b754f805e2bd7aeb3 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",