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
This commit is contained in:
Daniel Stenberg 2023-04-16 23:01:18 +02:00
parent 9c543de0ec
commit 8ff820388f
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View 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);