aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest/lib506.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/lib506.c
parent12d01bc5f72c4c0f9aabfa45628d9c4702491fb0 (diff)
Addes OOM handling for curl_easy_setopt() calls in test
Diffstat (limited to 'tests/libtest/lib506.c')
-rw-r--r--tests/libtest/lib506.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/libtest/lib506.c b/tests/libtest/lib506.c
index 823e05d3e..99cf915d3 100644
--- a/tests/libtest/lib506.c
+++ b/tests/libtest/lib506.c
@@ -224,12 +224,12 @@ int test(char *URL)
url = suburl( URL, i );
headers = sethost( NULL );
- curl_easy_setopt( curl, CURLOPT_HTTPHEADER, headers );
- curl_easy_setopt( curl, CURLOPT_URL, url );
+ test_setopt( curl, CURLOPT_HTTPHEADER, headers );
+ test_setopt( curl, CURLOPT_URL, url );
printf( "CURLOPT_SHARE\n" );
- curl_easy_setopt( curl, CURLOPT_SHARE, share );
+ test_setopt( curl, CURLOPT_SHARE, share );
printf( "CURLOPT_COOKIEJAR\n" );
- curl_easy_setopt( curl, CURLOPT_COOKIEJAR, JAR );
+ test_setopt( curl, CURLOPT_COOKIEJAR, JAR );
printf( "PERFORM\n" );
curl_easy_perform( curl );
@@ -245,6 +245,8 @@ int test(char *URL)
printf( "SHARE_CLEANUP failed, correct\n" );
}
+test_cleanup:
+
/* clean up last handle */
printf( "CLEANUP\n" );
curl_easy_cleanup( curl );