]> granicus.if.org Git - neomutt/commitdiff
fix: resource leak - CID 76983
authorRichard Russon <rich@flatcap.org>
Thu, 16 Feb 2017 12:29:29 +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 c9dce9be2d7d6384ad97bc2532fdbfc50d45e43e..f5919a862e79f5460ff9bb8649b52e5694ec6d40 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -1044,6 +1044,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mutt_perror (tempfile);
     mutt_sleep (5);
     FREE (&newOffset);
+    FREE (&oldOffset);
     return (-1);
   }
 
@@ -1108,6 +1109,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mutt_error (_("Write failed!  Saved partial mailbox to %s"), savefile);
     mutt_sleep (5);
     FREE (&newOffset);
+    FREE (&oldOffset);
     return (-1);
   }
 
@@ -1122,6 +1124,7 @@ static int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
     mx_fastclose_mailbox (ctx);
     mutt_error (_("Fatal error!  Could not reopen mailbox!"));
     FREE (&newOffset);
+    FREE (&oldOffset);
     return (-1);
   }