]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
src/tool_operhlp.c: fix value stored to 'uerr' is never read
authorDaniel Stenberg <daniel@haxx.se>
Sun, 16 Apr 2023 21:01:18 +0000 (23:01 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 17 Apr 2023 07:07:07 +0000 (09:07 +0200)
Ref: https://github.com/curl/curl/pull/10974#issuecomment-1510461343
Reported-by: Viktor Szakats
Closes #10982

src/tool_operhlp.c

index 9b70edd23cb4db8fbf6ba64619f68bb0899ca1dd..01a24b4338b25be7306683ce4ddbce0273499f67 100644 (file)
@@ -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);