summaryrefslogtreecommitdiff
path: root/tests/unit/unit1652.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/unit1652.c')
-rw-r--r--tests/unit/unit1652.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/unit/unit1652.c b/tests/unit/unit1652.c
index 2500ce95f..66f482125 100644
--- a/tests/unit/unit1652.c
+++ b/tests/unit/unit1652.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
@@ -63,8 +63,10 @@ unit_setup(void)
global_init(CURL_GLOBAL_ALL);
data = curl_easy_init();
- if(!data)
+ if(!data) {
+ curl_global_cleanup();
return CURLE_OUT_OF_MEMORY;
+ }
curl_easy_setopt(data, CURLOPT_DEBUGFUNCTION, debugf_cb);
curl_easy_setopt(data, CURLOPT_VERBOSE, 1L);
return CURLE_OK;