diff options
author | Daniel Stenberg <daniel@haxx.se> | 2019-07-21 13:21:13 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2019-07-21 13:22:05 +0200 |
commit | ae11b8b6770128188e47b902dac749ac0a77b0cc (patch) | |
tree | 27ca63eea60d891c95af05872c9bcc425a07831f | |
parent | 71299394ef813047ef4f9475665268be2b804278 (diff) | |
download | curl-bagder/check-return-value.tar.gz |
curl:create_transfers check return code from curl_easy_setoptbagder/check-return-value
From commit b8894085
Pointed out by Coverity CID 1451703
-rw-r--r-- | src/tool_operate.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tool_operate.c b/src/tool_operate.c index 1b3bec9cf..ceee08f49 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); |