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: neomutt-20160822~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab20c35d922a95e61f1f718bd1c1b585030a0f5e;p=neomutt 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 70f31f741..86d02ced6 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 {