* Note that imap_mxcmp() converts NULL to "INBOX", so we need to
* make sure the adata really is open to a folder. */
if (adata->mailbox && !imap_mxcmp(mdata->name, adata->mbox_name))
+ {
+ imap_mdata_free((void **) &mdata);
return adata->mailbox->msg_count;
+ }
else if (mutt_bit_isset(adata->capabilities, IMAP4REV1) ||
mutt_bit_isset(adata->capabilities, STATUS))
{
/* Server does not support STATUS, and this is not the current mailbox.
* There is no lightweight way to check recent arrivals */
+ imap_mdata_free((void **) &mdata);
return -1;
}
{
imap_exec(adata, buf, IMAP_CMD_QUEUE);
queued = 1;
+ imap_mdata_free((void **) &mdata);
return 0;
}
else if (!queued)
queued = 0;
status = imap_mboxcache_get(adata, mdata->name, false);
+ imap_mdata_free((void **) &mdata);
if (status)
return status->messages;