imap: avoid freeing constant string

The fix in 1a614c6c3 was wrong and would leed to free() of a fixed
string.

Pointed-out-by: Kamil Dudka
This commit is contained in:
Daniel Stenberg 2015-11-09 10:54:55 +01:00
parent 6225c48a03
commit f54a4aa9a3
1 changed files with 1 additions and 1 deletions

View File

@ -654,7 +654,7 @@ static CURLcode imap_perform_list(struct connectdata *conn)
imap->custom_params ? imap->custom_params : "");
else {
/* Make sure the mailbox is in the correct atom format if necessary */
mailbox = imap->mailbox ? imap_atom(imap->mailbox, true) : (char *) "";
mailbox = imap->mailbox ? imap_atom(imap->mailbox, true) : strdup("");
if(!mailbox)
return CURLE_OUT_OF_MEMORY;