aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/imap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/imap.c b/lib/imap.c
index b0809e320..a7409f704 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -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;