]> granicus.if.org Git - mutt/commitdiff
Plug an mbox leak parsing the Postponed folder in imap_open_mailbox (slightly
authorKyle Wheeler <kyle-mutt-dev@memoryhole.net>
Sun, 9 Jul 2006 20:05:02 +0000 (20:05 +0000)
committerKyle Wheeler <kyle-mutt-dev@memoryhole.net>
Sun, 9 Jul 2006 20:05:02 +0000 (20:05 +0000)
modified to prevent bad free calls).

imap/imap.c

index 4a5d6009cd8f98f877a949650cbe3af7623a7ad1..714383c49912fcf2552e79cd0bc5da1a077a3399 100644 (file)
@@ -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);