changeset: 6741:81ecc31f8197
user:      Kevin McCarthy <[email protected]>
date:      Thu Jul 21 14:00:24 2016 -0700
link:      http://dev.mutt.org/hg/mutt/rev/81ecc31f8197

Fix memleak in the new trash folder code.

Free the context in opened in trash_append()

diffs (17 lines):

diff -r 2d1279b26e22 -r 81ecc31f8197 mx.c
--- a/mx.c      Thu Jul 21 12:49:19 2016 +0200
+++ b/mx.c      Thu Jul 21 14:00:24 2016 -0700
@@ -849,11 +849,13 @@
         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
   {

Reply via email to