summaryrefslogtreecommitdiff
path: root/tests/libtest/lib518.c
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2010-02-05 18:07:19 +0000
committerYang Tse <yangsita@gmail.com>2010-02-05 18:07:19 +0000
commitcad9c3f55fad5da988144dc83ad76a8544a071a2 (patch)
tree9231f49bc11dfdb69b4cac9af3b1dd473d1507ad /tests/libtest/lib518.c
parent12d01bc5f72c4c0f9aabfa45628d9c4702491fb0 (diff)
downloadcurl-cad9c3f55fad5da988144dc83ad76a8544a071a2.tar.gz
Addes OOM handling for curl_easy_setopt() calls in test
Diffstat (limited to 'tests/libtest/lib518.c')
-rw-r--r--tests/libtest/lib518.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/libtest/lib518.c b/tests/libtest/lib518.c
index a1b914916..d8310d92d 100644
--- a/tests/libtest/lib518.c
+++ b/tests/libtest/lib518.c
@@ -484,11 +484,13 @@ int test(char *URL)
return TEST_ERR_MAJOR_BAD;
}
- curl_easy_setopt(curl, CURLOPT_URL, URL);
- curl_easy_setopt(curl, CURLOPT_HEADER, 1L);
+ test_setopt(curl, CURLOPT_URL, URL);
+ test_setopt(curl, CURLOPT_HEADER, 1L);
res = curl_easy_perform(curl);
+test_cleanup:
+
close_file_descriptors();
curl_easy_cleanup(curl);
curl_global_cleanup();