From: Kyle Wheeler Date: Sun, 9 Jul 2006 20:05:02 +0000 (+0000) Subject: Plug an mbox leak parsing the Postponed folder in imap_open_mailbox (slightly X-Git-Tag: mutt-1-5-12-rel~14 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=88acaeb1b5328f0921910e0290a4c18b9f704708;p=mutt Plug an mbox leak parsing the Postponed folder in imap_open_mailbox (slightly modified to prevent bad free calls). --- diff --git a/imap/imap.c b/imap/imap.c index 4a5d6009..714383c4 100644 --- a/imap/imap.c +++ b/imap/imap.c @@ -598,9 +598,11 @@ int imap_open_mailbox (CONTEXT* ctx) mutt_bit_set (idata->rights, IMAP_ACL_DELETE); } /* pipeline the postponed count if possible */ + pmx.mbox = NULL; if (mx_is_imap (Postponed) && !imap_parse_path (Postponed, &pmx) && mutt_account_match (&pmx.account, &mx.account)) imap_status (Postponed, 1); + FREE (&pmx.mbox); snprintf (bufout, sizeof (bufout), "%s %s", ctx->readonly ? "EXAMINE" : "SELECT", buf);