]> granicus.if.org Git - neomutt/commitdiff
fix: resource leak - CID 76982
authorRichard Russon <rich@flatcap.org>
Thu, 16 Feb 2017 12:29:08 +0000 (12:29 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 20 Feb 2017 16:31:03 +0000 (16:31 +0000)
mbox.c

diff --git a/mbox.c b/mbox.c
index 97c3d19b06e225352cbf7decd87eb521ad5f11e4..c9dce9be2d7d6384ad97bc2532fdbfc50d45e43e 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -1043,6 +1043,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mutt_debug (1, "mbox_sync_mailbox: unable to reopen temp copy of mailbox!\n");
     mutt_perror (tempfile);
     mutt_sleep (5);
+    FREE (&newOffset);
     return (-1);
   }
 
@@ -1106,6 +1107,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mutt_pretty_mailbox (savefile, sizeof (savefile));
     mutt_error (_("Write failed!  Saved partial mailbox to %s"), savefile);
     mutt_sleep (5);
+    FREE (&newOffset);
     return (-1);
   }
 
@@ -1119,6 +1121,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mutt_unblock_signals ();
     mx_fastclose_mailbox (ctx);
     mutt_error (_("Fatal error!  Could not reopen mailbox!"));
+    FREE (&newOffset);
     return (-1);
   }