From ff3876046e6ab71c48014c2a421a51d2168a4c94 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Jun 2019 11:09:32 +0200 Subject: unit1654: cleanup on memory failure ... to make it handle torture tests properly. Reported-by: Marcel Raad Fixes #4021 Closes #4022 --- tests/unit/unit1654.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tests/unit') 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; -- cgit v1.2.3