diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-11-09 10:54:55 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-11-09 10:54:55 +0100 |
commit | f54a4aa9a383c93065735e441355c49ef42129f4 (patch) | |
tree | 62963051dfccb833ae48d9eb5ee53cd2b51c380c /lib | |
parent | 6225c48a03630bd2ec1589188de7b0dd86014376 (diff) |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/imap.c | 2 |
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; |