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:
Daniel Stenberg 2020-11-02 08:26:40 +01:00
parent 6da7a7e5ce
commit 95d30409be
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 9 additions and 2 deletions

View file

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