aboutsummaryrefslogtreecommitdiff
path: root/lib/mime.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mime.c')
-rw-r--r--lib/mime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mime.c b/lib/mime.c
index ce56d7873..4c0d2eeba 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -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;