diff options
author | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-12-30 16:51:38 +0100 |
---|---|---|
committer | Michael Kaufmann <mail@michael-kaufmann.ch> | 2017-12-30 16:52:51 +0100 |
commit | 481539e9020138abec6416e5a75daddd862267d7 (patch) | |
tree | c42595f43bc599a15644514b86073ff9218278f6 | |
parent | 593dcc553a096a7f773d3ade217335f3dfe0eee2 (diff) |
test1554: improve the error handling
-rw-r--r-- | tests/libtest/lib1554.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/libtest/lib1554.c b/tests/libtest/lib1554.c index 35dbf2c1e..8842ae2f7 100644 --- a/tests/libtest/lib1554.c +++ b/tests/libtest/lib1554.c @@ -51,6 +51,12 @@ int test(char *URL) global_init(CURL_GLOBAL_ALL); share = curl_share_init(); + if(!share) { + fprintf(stderr, "curl_share_init() failed\n"); + curl_global_cleanup(); + return TEST_ERR_MAJOR_BAD; + } + curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); curl_share_setopt(share, CURLSHOPT_LOCKFUNC, my_lock); curl_share_setopt(share, CURLSHOPT_UNLOCKFUNC, my_unlock); |