From: Daniel Stenberg Date: Sun, 16 Apr 2023 21:01:18 +0000 (+0200) Subject: src/tool_operhlp.c: fix value stored to 'uerr' is never read X-Git-Tag: curl-8_1_0~133 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8ff820388f7ba83490dd8bf5a3bd9d902ac09315;p=thirdparty%2Fcurl.git src/tool_operhlp.c: fix value stored to 'uerr' is never read Ref: https://github.com/curl/curl/pull/10974#issuecomment-1510461343 Reported-by: Viktor Szakats Closes #10982 --- diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index 9b70edd23c..01a24b4338 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -110,7 +110,7 @@ CURLcode add_file_name_to_url(CURL *curl, char **inurlp, const char *filename) goto fail; } uerr = curl_url_get(uh, CURLUPART_QUERY, &query, 0); - if(query) { + if(!uerr && query) { curl_free(query); curl_free(path); curl_url_cleanup(uh);