mirror of
https://github.com/moparisthebest/curl
synced 2024-11-12 04:25:08 -05:00
examples/postinmemory.c: Call curl_global_cleanup always
Prior to this change curl_global_cleanup was not called if curl_easy_init failed. Reported-by: kouzhudong@users.noreply.github.com Fixes https://github.com/curl/curl/issues/4751
This commit is contained in:
parent
4c2f5d52ba
commit
68da0b8b86
@ -104,10 +104,9 @@ int main(void)
|
|||||||
|
|
||||||
/* always cleanup */
|
/* always cleanup */
|
||||||
curl_easy_cleanup(curl);
|
curl_easy_cleanup(curl);
|
||||||
|
|
||||||
/* we're done with libcurl, so clean it up */
|
|
||||||
curl_global_cleanup();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(chunk.memory);
|
free(chunk.memory);
|
||||||
|
curl_global_cleanup();
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user