]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
unit1620: fix bad free in OOM
authorDaniel Stenberg <daniel@haxx.se>
Thu, 12 Dec 2019 22:49:00 +0000 (23:49 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 13 Dec 2019 07:16:35 +0000 (08:16 +0100)
Closes #4709

tests/unit/unit1620.c

index c6aa721cf21b2b9cd8f220eb21831f3b99cb42e7..6e572c648cb3b56be68c3e8fe9f0e001233f5ff7 100644 (file)
@@ -46,6 +46,8 @@ UNITTEST_START
   bool protocol_connect = FALSE;
 
   rc = Curl_open(&empty);
+  if(rc)
+    goto unit_test_abort;
   fail_unless(rc == CURLE_OK, "Curl_open() failed");
 
   rc = Curl_connect(empty, &async, &protocol_connect);