]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
curl:create_transfers check return code from curl_easy_setopt
authorDaniel Stenberg <daniel@haxx.se>
Sun, 21 Jul 2019 11:21:13 +0000 (13:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sun, 21 Jul 2019 22:28:55 +0000 (00:28 +0200)
From commit b8894085

Pointed out by Coverity CID 1451703

Closes #4134

src/tool_operate.c

index 14fffda36a13ee11f7c444c02ae0db4789ad8446..6b2d89ffb3d4f9b41b55894a4eedf5f33c669fb7 100644 (file)
@@ -1110,7 +1110,9 @@ static CURLcode create_transfers(struct GlobalConfig *global,
 
         /* avoid having this setopt added to the --libcurl source
            output */
-        curl_easy_setopt(curl, CURLOPT_SHARE, share);
+        result = curl_easy_setopt(curl, CURLOPT_SHARE, share);
+        if(result)
+          goto show_error;
 
         if(!config->tcp_nodelay)
           my_setopt(curl, CURLOPT_TCP_NODELAY, 0L);