From: Steve Holme Date: Fri, 6 Nov 2015 21:49:26 +0000 (+0000) Subject: imap: Don't call imap_atom() when no mailbox specified in LIST command X-Git-Tag: curl-7_46_0~103 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=505d966850bdb1067629010f952005f63d1fa78a;p=curl imap: Don't call imap_atom() when no mailbox specified in LIST command --- diff --git a/lib/imap.c b/lib/imap.c index e6d83f2cf..8d805e83d 100644 --- a/lib/imap.c +++ b/lib/imap.c @@ -653,8 +653,8 @@ static CURLcode imap_perform_list(struct connectdata *conn) result = imap_sendf(conn, "%s%s", imap->custom, imap->custom_params ? imap->custom_params : ""); else { - /* Make sure the mailbox is in the correct atom format */ - mailbox = imap_atom(imap->mailbox ? imap->mailbox : ""); + /* Make sure the mailbox is in the correct atom format if necessary */ + mailbox = imap->mailbox ? imap_atom(imap->mailbox) : ""; if(!mailbox) return CURLE_OUT_OF_MEMORY;