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: neomutt-20160822~60 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ddac5309a0188e6886263edba840c18779ba733f;p=neomutt Fix memleak in mh_read_dir() when sequence parsing fails. --- diff --git a/mh.c b/mh.c index f7ce25fc4..371656af4 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); }