From 8089dcfc5d4b34b15cee1f1cc9b3124c0279d41b Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Sun, 30 Apr 2017 10:54:26 +0200 Subject: tests: fixed OOM handling of unit tests to abort test It's dangerous to continue to run the test when a memory alloc fails. --- tests/unit/unit1600.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/unit/unit1600.c') diff --git a/tests/unit/unit1600.c b/tests/unit/unit1600.c index f0f9cc1f4..af0ad8435 100644 --- a/tests/unit/unit1600.c +++ b/tests/unit/unit1600.c @@ -29,7 +29,7 @@ CURL *easy; static CURLcode unit_setup(void) { easy = curl_easy_init(); - return CURLE_OK; + return easy ? CURLE_OK : CURLE_OUT_OF_MEMORY; } static void unit_stop(void) -- cgit v1.2.3