summaryrefslogtreecommitdiff
path: root/tests/libtest/lib1550.c
diff options
context:
space:
mode:
authorDan Fandrich <dan@coneharvesters.com>2017-08-19 21:27:38 +0200
committerDan Fandrich <dan@coneharvesters.com>2017-08-19 21:42:47 +0200
commitc468c27b5a8abb8134b3f89439aaac45f37d22d7 (patch)
tree94fa73f73c03b1ff79df9264332724ecaec8e82c /tests/libtest/lib1550.c
parentc1a75407cc515f310b8b7caf6bbf6e6cb5fde38c (diff)
downloadcurl-c468c27b5a8abb8134b3f89439aaac45f37d22d7.tar.gz
tests: Make sure libtests call curl_global_cleanup()
This ensures that global data allocations are freed so Valgrind stays happy. This was a problem with at least PolarSSL and mbedTLS.
Diffstat (limited to 'tests/libtest/lib1550.c')
-rw-r--r--tests/libtest/lib1550.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/tests/libtest/lib1550.c b/tests/libtest/lib1550.c
index 94ee576ca..d3e17e4fe 100644
--- a/tests/libtest/lib1550.c
+++ b/tests/libtest/lib1550.c
@@ -27,13 +27,20 @@
int test(char *URL)
{
- CURLM *handle = curl_multi_init();
- const char *bl_servers[] = {"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
- const char *bl_sites[] = {"curl.haxx.se:443", "example.com:80", NULL};
+ CURLM *handle;
+ int res = CURLE_OK;
+ static const char * const bl_servers[] =
+ {"Microsoft-IIS/6.0", "nginx/0.8.54", NULL};
+ static const char * const bl_sites[] =
+ {"curl.haxx.se:443", "example.com:80", NULL};
+
+ global_init(CURL_GLOBAL_ALL);
+ handle = curl_multi_init();
(void)URL; /* unused */
curl_multi_setopt(handle, CURLMOPT_PIPELINING_SERVER_BL, bl_servers);
curl_multi_setopt(handle, CURLMOPT_PIPELINING_SITE_BL, bl_sites);
curl_multi_cleanup(handle);
+ curl_global_cleanup();
return 0;
}