mirror of
https://github.com/curl/curl.git
synced 2026-08-25 20:33:35 +03:00
tests: add missing global_init/cleanup calls
Without the cleanup call in these test files, the mbedTLS backend leaks memory. Closes #6156
This commit is contained in:
parent
6da7a7e5ce
commit
95d30409be
3 changed files with 9 additions and 2 deletions
|
|
@ -56,6 +56,7 @@ UNITTEST_START
|
|||
Curl_altsvc_cleanup(&asi);
|
||||
return result;
|
||||
}
|
||||
curl_global_init(CURL_GLOBAL_ALL);
|
||||
curl = curl_easy_init();
|
||||
if(!curl)
|
||||
goto fail;
|
||||
|
|
@ -129,6 +130,7 @@ UNITTEST_START
|
|||
Curl_altsvc_save(curl, asi, outname);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
curl_global_cleanup();
|
||||
fail:
|
||||
Curl_altsvc_cleanup(&asi);
|
||||
return unitfail;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue