summaryrefslogtreecommitdiff
path: root/lib/mime.c
diff options
context:
space:
mode:
authorPatrick Monnerat <patrick@monnerat.net>2017-10-09 01:26:27 +0100
committerPatrick Monnerat <patrick@monnerat.net>2017-10-09 01:26:27 +0100
commit06cb8adde2ef85c3ac610f93c0fc8a34a3e299b6 (patch)
tree814a289d4804dc42268e75a4959cb89aea5f52d5 /lib/mime.c
parent232dffcf2422baefa66617fdae2fb20085a8e386 (diff)
downloadcurl-06cb8adde2ef85c3ac610f93c0fc8a34a3e299b6.tar.gz
mime: properly unbind mime structure in curl_mime_free().
This allows freeing a mime structure bound to the easy handle before curl_easy_cleanup(). Fixes #1970.
Diffstat (limited to 'lib/mime.c')
-rw-r--r--lib/mime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/mime.c b/lib/mime.c
index 04746ed09..cba95b929 100644
--- a/lib/mime.c
+++ b/lib/mime.c
@@ -1130,6 +1130,7 @@ void curl_mime_free(curl_mime *mime)
curl_mimepart *part;
if(mime) {
+ mime_subparts_unbind(mime); /* Be sure it's not referenced anymore. */
while(mime->firstpart) {
part = mime->firstpart;
mime->firstpart = part->nextpart;