1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04: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:
Jay Satiro 2019-12-24 01:06:47 -05:00
parent 4c2f5d52ba
commit 68da0b8b86

View File

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