1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00

Fixed an OOM problem with test 560

This commit is contained in:
Dan Fandrich 2008-11-12 22:26:06 +00:00
parent fb8870297d
commit b2ed1e2607

View File

@ -28,6 +28,8 @@ int test(char *URL)
int still_running; /* keep number of running handles */
http_handle = curl_easy_init();
if (!http_handle)
return TEST_ERR_MAJOR_BAD;
/* set options */
curl_easy_setopt(http_handle, CURLOPT_URL, URL);
@ -37,6 +39,10 @@ int test(char *URL)
/* init a multi stack */
multi_handle = curl_multi_init();
if (!multi_handle) {
curl_easy_cleanup(http_handle);
return TEST_ERR_MAJOR_BAD;
}
/* add the individual transfers */
curl_multi_add_handle(multi_handle, http_handle);