From cad9c3f55fad5da988144dc83ad76a8544a071a2 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 5 Feb 2010 18:07:19 +0000 Subject: Addes OOM handling for curl_easy_setopt() calls in test --- tests/libtest/lib521.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'tests/libtest/lib521.c') diff --git a/tests/libtest/lib521.c b/tests/libtest/lib521.c index 60fe4d95d..a51b4e83c 100644 --- a/tests/libtest/lib521.c +++ b/tests/libtest/lib521.c @@ -28,13 +28,15 @@ int test(char *URL) return TEST_ERR_MAJOR_BAD; } - curl_easy_setopt(curl, CURLOPT_URL, URL); - curl_easy_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2)); - curl_easy_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); - curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); + test_setopt(curl, CURLOPT_URL, URL); + test_setopt(curl, CURLOPT_PORT, atoi(libtest_arg2)); + test_setopt(curl, CURLOPT_USERPWD, "xxx:yyy"); + test_setopt(curl, CURLOPT_VERBOSE, 1L); res = curl_easy_perform(curl); +test_cleanup: + curl_easy_cleanup(curl); curl_global_cleanup(); -- cgit v1.2.3