summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-06-13 11:09:32 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-06-13 17:22:51 +0200
commitff3876046e6ab71c48014c2a421a51d2168a4c94 (patch)
tree8f430fa06c1adb298a294cc88e2dff23f37d660d
parent74f911d4635a2f120e9afee2810fa62a41f18bce (diff)
downloadcurl-ff3876046e6ab71c48014c2a421a51d2168a4c94.tar.gz
unit1654: cleanup on memory failure
... to make it handle torture tests properly. Reported-by: Marcel Raad Fixes #4021 Closes #4022
-rw-r--r--tests/unit/unit1654.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unit/unit1654.c b/tests/unit/unit1654.c
index 7532c6d61..9d1a3e211 100644
--- a/tests/unit/unit1654.c
+++ b/tests/unit/unit1654.c
@@ -53,8 +53,10 @@ UNITTEST_START
if(!asi)
return 1;
result = Curl_altsvc_load(asi, arg);
- if(result)
+ if(result) {
+ Curl_altsvc_cleanup(asi);
return result;
+ }
curl = curl_easy_init();
if(!curl)
goto fail;