summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-07-29 18:23:38 +0200
committerYang Tse <yangsita@gmail.com>2013-07-29 18:32:39 +0200
commit9a5c2d83734ec671f7fb81788a916f9ffa6fb4b6 (patch)
treea3e46a66cd1e38956cb3964e027d2e32bcb57be4 /src
parent8693bbd8c4ff42d2ca9baeaf1108c4a11f3cf31c (diff)
downloadcurl-9a5c2d83734ec671f7fb81788a916f9ffa6fb4b6.tar.gz
tool_operhlp.c: fix add_file_name_to_url() OOM handling
Diffstat (limited to 'src')
-rw-r--r--src/tool_operhlp.c2
1 files changed, 2 insertions, 0 deletions
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;
}