mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
mime: avoid NULL pointer dereference risk
Coverity detected, CID 1435120 Closes #2527
This commit is contained in:
parent
dd7521bcc1
commit
ba67f7d65a
@ -1205,7 +1205,7 @@ CURLcode Curl_mime_duppart(curl_mimepart *dst, const curl_mimepart *src)
|
||||
res = curl_mime_filename(dst, src->filename);
|
||||
|
||||
/* If an error occurred, rollback. */
|
||||
if(res)
|
||||
if(res && dst)
|
||||
Curl_mime_cleanpart(dst);
|
||||
|
||||
return res;
|
||||
|
Loading…
Reference in New Issue
Block a user