summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-04-16 23:01:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2023-04-17 09:07:07 +0200
commit8ff820388f7ba83490dd8bf5a3bd9d902ac09315 (patch)
tree767ddb91208df850bb0f41efbb444568a860d77d /src
parent9c543de0ecf14880c3324d3d24591fb695dd1917 (diff)
downloadcurl-8ff820388f7ba83490dd8bf5a3bd9d902ac09315.tar.gz
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
Diffstat (limited to 'src')
-rw-r--r--src/tool_operhlp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c
index 9b70edd23..01a24b433 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);