From: Wilfried Goesgens Date: Mon, 15 Nov 2010 11:41:55 +0000 (+0100) Subject: smtp_do_bounce(): don't loose msg['A'] when overwriting its content. X-Git-Tag: v7.86~34 X-Git-Url: https://code.citadel.org/?a=commitdiff_plain;h=88c95c808fbfe4fe46dff12ff2344359c5ead867;hp=d94ac19a5735a7748258eb939cfb429abc59b23b;p=citadel.git smtp_do_bounce(): don't loose msg['A'] when overwriting its content. --- diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index fdd20889e..bd2cb7178 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -1480,6 +1480,8 @@ void smtp_do_bounce(char *instr) { StrBufAppendBufPlain(BounceMB, HKEY("--"), 0); StrBufAppendBuf(BounceMB, boundary, 0); StrBufAppendBufPlain(BounceMB, HKEY("--\r\n"), 0); + if (bmsg->cm_fields['A'] != NULL) + free(bmsg->cm_fields['A']); bmsg->cm_fields['A'] = SmashStrBuf(&BounceMB); /* Deliver the bounce if there's anything worth mentioning */ CtdlLogPrintf(CTDL_DEBUG, "num_bounces = %d\n", num_bounces);