mirror of
https://github.com/moparisthebest/curl
synced 2024-12-24 09:08:49 -05: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