From 380a65d854a73f0d323ce64251d37c9a2843e86d Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Mon, 15 Nov 2010 12:41:55 +0100 Subject: [PATCH] smtp_do_bounce(): don't loose msg['A'] when overwriting its content. --- citadel/modules/smtp/serv_smtp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index 159d36914..30f46a648 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -1478,6 +1478,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); -- 2.30.2