diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index d3c1a88a9..c33ca507d 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -139,6 +139,8 @@ char *add_file_name_to_url(CURL *curl, char *url, const char *filename) url = urlbuffer; /* use our new URL instead! */ } + else + Curl_safefree(url); } return url; }