From 505d966850bdb1067629010f952005f63d1fa78a Mon Sep 17 00:00:00 2001 From: Steve Holme Date: Fri, 6 Nov 2015 21:49:26 +0000 Subject: imap: Don't call imap_atom() when no mailbox specified in LIST command --- lib/imap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') 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; -- cgit v1.2.3