1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

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

View File

@ -654,7 +654,7 @@ static CURLcode imap_perform_list(struct connectdata *conn)
imap->custom_params ? imap->custom_params : ""); imap->custom_params ? imap->custom_params : "");
else { else {
/* Make sure the mailbox is in the correct atom format if necessary */ /* 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) if(!mailbox)
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;