From f30a4cdbde4adc5468a797f50c6bc88eb790a00c Mon Sep 17 00:00:00 2001 From: Kevin McCarthy Date: Thu, 21 Jul 2016 14:00:24 -0700 Subject: [PATCH] Fix memleak in the new trash folder code. Free the context in opened in trash_append() --- mx.c | 2 ++ 1 file changed, 2 insertions(+) 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 { -- 2.40.0