From 23c99f60babd64164776c8bef1525fa411f8bed1 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 Closes #4134 --- src/tool_operate.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3