diff options
Diffstat (limited to 'tests/libtest/lib560.c')
-rw-r--r-- | tests/libtest/lib560.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c index 3e34cf788..f553cc785 100644 --- a/tests/libtest/lib560.c +++ b/tests/libtest/lib560.c @@ -23,8 +23,9 @@ int test(char *URL) { CURL *http_handle; - CURLM *multi_handle; + CURLM *multi_handle = NULL; CURLMcode code; + int res; int still_running; /* keep number of running handles */ @@ -33,10 +34,10 @@ int test(char *URL) return TEST_ERR_MAJOR_BAD; /* set options */ - curl_easy_setopt(http_handle, CURLOPT_URL, URL); - curl_easy_setopt(http_handle, CURLOPT_HEADER, 1L); - curl_easy_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L); - curl_easy_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L); + test_setopt(http_handle, CURLOPT_URL, URL); + test_setopt(http_handle, CURLOPT_HEADER, 1L); + test_setopt(http_handle, CURLOPT_SSL_VERIFYPEER, 0L); + test_setopt(http_handle, CURLOPT_SSL_VERIFYHOST, 0L); /* init a multi stack */ multi_handle = curl_multi_init(); @@ -93,9 +94,12 @@ int test(char *URL) } } - curl_multi_cleanup(multi_handle); +test_cleanup: + + if(multi_handle) + curl_multi_cleanup(multi_handle); curl_easy_cleanup(http_handle); - return 0; + return res; } |