diff options
author | Dan Fandrich <dan@coneharvesters.com> | 2008-11-12 22:26:06 +0000 |
---|---|---|
committer | Dan Fandrich <dan@coneharvesters.com> | 2008-11-12 22:26:06 +0000 |
commit | b2ed1e2607532ce56f06bd8d2eaff98df981f321 (patch) | |
tree | c7b2aaf2d7bb38de58fcab07c63ea836a5b31d45 /tests | |
parent | fb8870297d4ac6583e38d5432095da07d7fe6afb (diff) |
Fixed an OOM problem with test 560
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libtest/lib560.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libtest/lib560.c b/tests/libtest/lib560.c index e9d51c4d1..d2de7bfb4 100644 --- a/tests/libtest/lib560.c +++ b/tests/libtest/lib560.c @@ -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); |