aboutsummaryrefslogtreecommitdiff
path: root/tests/libtest
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libtest')
-rw-r--r--tests/libtest/lib1554.c6
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);