From ae11b8b6770128188e47b902dac749ac0a77b0cc Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 21 Jul 2019 13:21:13 +0200 Subject: curl:create_transfers check return code from curl_easy_setopt From commit b8894085 Pointed out by Coverity CID 1451703 --- src/tool_operate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); -- cgit v1.2.1