From: Kevin McCarthy Date: Fri, 5 Aug 2016 20:43:00 +0000 (-0700) Subject: Fix memleak in mh_read_dir() when sequence parsing fails. X-Git-Tag: mutt-1-7-rel~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f6cdf20a7aab5239780df34eaa62383bd104f7e;p=mutt Fix memleak in mh_read_dir() when sequence parsing fails. --- diff --git a/mh.c b/mh.c index f7ce25fc..371656af 100644 --- a/mh.c +++ b/mh.c @@ -1260,7 +1260,10 @@ static int mh_read_dir (CONTEXT * ctx, const char *subdir) if (ctx->magic == MUTT_MH) { if (mh_read_sequences (&mhs, ctx->path) < 0) + { + maildir_free_maildir (&md); return -1; + } mh_update_maildir (md, &mhs); mhs_free_sequences (&mhs); }