mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
imap: add a check for failing strdup()
This commit is contained in:
parent
91765104c2
commit
8a86ccf343
@ -1115,7 +1115,10 @@ static CURLcode imap_state_select_resp(struct Curl_easy *data, int imapcode,
|
||||
}
|
||||
else {
|
||||
/* Note the currently opened mailbox on this connection */
|
||||
DEBUGASSERT(!imapc->mailbox);
|
||||
imapc->mailbox = strdup(imap->mailbox);
|
||||
if(!imapc->mailbox)
|
||||
return CURLE_OUT_OF_MEMORY;
|
||||
|
||||
if(imap->custom)
|
||||
result = imap_perform_list(data);
|
||||
|
Loading…
Reference in New Issue
Block a user