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.
This commit is contained in:
Patrick Monnerat 2017-10-09 01:26:27 +01:00
parent 232dffcf24
commit 06cb8adde2
1 changed files with 1 additions and 0 deletions

View File

@ -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;