Commit f54a4aa9 authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

imap: avoid freeing constant string

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

Pointed-out-by: Kamil Dudka
parent 6225c48a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;