From: Daniel Stenberg Date: Sun, 21 Jul 2019 11:21:13 +0000 (+0200) Subject: curl:create_transfers check return code from curl_easy_setopt X-Git-Tag: curl-7_66_0~204 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=23c99f60babd64164776c8bef1525fa411f8bed1;p=thirdparty%2Fcurl.git curl:create_transfers check return code from curl_easy_setopt From commit b8894085 Pointed out by Coverity CID 1451703 Closes #4134 --- diff --git a/src/tool_operate.c b/src/tool_operate.c index 14fffda36a..6b2d89ffb3 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);