Skip to content

Commit

Permalink
fixup unit1654 to survive torture test
Browse files Browse the repository at this point in the history
  • Loading branch information
bagder committed Jan 28, 2019
1 parent bca4f04 commit d24071b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/unit/unit1654.c
Expand Up @@ -45,11 +45,14 @@ UNITTEST_START
UNITTEST_START
{
char outname[256];
CURL *curl = curl_easy_init();
CURL *curl;
CURLcode result;
struct altsvcinfo *asi = Curl_altsvc_init(arg);
if(!asi)
return 1;
curl = curl_easy_init();
if(!curl)
goto fail;
fail_unless(asi->num == 4, "wrong number of entries");
msnprintf(outname, sizeof(outname), "%s-out", arg);

Expand Down Expand Up @@ -107,8 +110,9 @@ UNITTEST_START

Curl_altsvc_save(asi, outname);

Curl_altsvc_cleanup(asi);
curl_easy_cleanup(curl);
fail:
Curl_altsvc_cleanup(asi);
return unitfail;
}
UNITTEST_STOP
Expand Down

0 comments on commit d24071b

Please sign in to comment.