mirror of
https://github.com/curl/curl.git
synced 2026-05-30 07:57:27 +03: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
1 changed files with 2 additions and 3 deletions
|
|
@ -104,10 +104,9 @@ int main(void)
|
|||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
|
||||
/* we're done with libcurl, so clean it up */
|
||||
curl_global_cleanup();
|
||||
}
|
||||
|
||||
free(chunk.memory);
|
||||
curl_global_cleanup();
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue