aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-07-21 13:21:13 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-07-22 00:28:55 +0200
commit23c99f60babd64164776c8bef1525fa411f8bed1 (patch)
tree14ef277965ed195c9b3126b765d01a82dbf391e9 /src
parent3af0e76d1e71995b7790c74e79b76af86ee7c681 (diff)
curl:create_transfers check return code from curl_easy_setopt
From commit b8894085 Pointed out by Coverity CID 1451703 Closes #4134
Diffstat (limited to 'src')
-rw-r--r--src/tool_operate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c
index 14fffda36..6b2d89ffb 100644
--- a/src/tool_operate.c
+++ b/src/tool_operate.c
@@ -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);