aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libtest/lib1523.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest/lib1523.c')
-rw-r--r--tests/libtest/lib1523.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/libtest/lib1523.c b/tests/libtest/lib1523.c
index 170527d8..bd45b847 100644
--- a/tests/libtest/lib1523.c
+++ b/tests/libtest/lib1523.c
@@ -5,11 +5,11 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2020, 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
- * are also available at https://curl.haxx.se/docs/copyright.html.
+ * are also available at https://curl.se/docs/copyright.html.
*
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
* copies of the Software, and permit persons to whom the Software is
@@ -56,8 +56,10 @@ static CURLcode run(CURL *hnd, long limit, long time)
int test(char *URL)
{
CURLcode ret;
- CURL *hnd = curl_easy_init();
+ CURL *hnd;
char buffer[CURL_ERROR_SIZE];
+ curl_global_init(CURL_GLOBAL_ALL);
+ hnd = curl_easy_init();
curl_easy_setopt(hnd, CURLOPT_URL, URL);
curl_easy_setopt(hnd, CURLOPT_WRITEFUNCTION, write_cb);
curl_easy_setopt(hnd, CURLOPT_ERRORBUFFER, buffer);
@@ -77,6 +79,7 @@ int test(char *URL)
printf("End: %d\n", time(NULL));
curl_easy_cleanup(hnd);
+ curl_global_cleanup();
return (int)ret;
}