aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib541.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/lib541.c
parent12d01bc5f72c4c0f9aabfa45628d9c4702491fb0 (diff)
Addes OOM handling for curl_easy_setopt() calls in test
Diffstat (limited to 'tests/libtest/lib541.c')
-rw-r--r--tests/libtest/lib541.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/libtest/lib541.c b/tests/libtest/lib541.c
index b895a25a9..9305a936c 100644
--- a/tests/libtest/lib541.c
+++ b/tests/libtest/lib541.c
@@ -90,16 +90,16 @@ int test(char *URL)
}
/* enable uploading */
- curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
+ test_setopt(curl, CURLOPT_UPLOAD, 1L);
/* enable verbose */
- curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+ test_setopt(curl, CURLOPT_VERBOSE, 1L);
/* specify target */
- curl_easy_setopt(curl,CURLOPT_URL, URL);
+ test_setopt(curl,CURLOPT_URL, URL);
/* now specify which file to upload */
- curl_easy_setopt(curl, CURLOPT_INFILE, hd_src);
+ test_setopt(curl, CURLOPT_INFILE, hd_src);
/* Now run off and do what you've been told! */
res = curl_easy_perform(curl);
@@ -108,6 +108,8 @@ int test(char *URL)
is at end of file */
res = curl_easy_perform(curl);
+test_cleanup:
+
/* close the local file */
fclose(hd_src);