summaryrefslogtreecommitdiff
path: root/tests/unit/unit1605.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit1605.c')
-rw-r--r--tests/unit/unit1605.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/unit1605.c b/tests/unit/unit1605.c
index 9a77da2f0..26115a834 100644
--- a/tests/unit/unit1605.c
+++ b/tests/unit/unit1605.c
@@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -31,8 +31,10 @@ static CURLcode unit_setup(void)
global_init(CURL_GLOBAL_ALL);
easy = curl_easy_init();
- if(!easy)
+ if(!easy) {
+ curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
+ }
return res;
}