From: Kevin McCarthy Date: Thu, 21 Jul 2016 21:00:24 +0000 (-0700) Subject: Fix memleak in the new trash folder code. X-Git-Tag: mutt-1-7-rel~23 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f30a4cdbde4adc5468a797f50c6bc88eb790a00c;p=mutt Fix memleak in the new trash folder code. Free the context in opened in trash_append() --- diff --git a/mx.c b/mx.c index 70f31f74..86d02ced 100644 --- a/mx.c +++ b/mx.c @@ -849,11 +849,13 @@ static int trash_append (CONTEXT *ctx) if (mutt_append_message (ctx_trash, ctx, ctx->hdrs[i], 0, 0) == -1) { mx_close_mailbox (ctx_trash, NULL); + FREE (&ctx_trash); return -1; } } mx_close_mailbox (ctx_trash, NULL); + FREE (&ctx_trash); } else {