Skip to content

Commit

Permalink
test1554: improve the error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
mkauf committed Dec 30, 2017
1 parent 593dcc5 commit 481539e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/libtest/lib1554.c
Expand Up @@ -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);
Expand Down

0 comments on commit 481539e

Please sign in to comment.