1
0
mirror of https://github.com/moparisthebest/curl synced 2025-02-28 17:31:46 -05:00

formdata: Must use Curl_safefree instead of free

This commit is contained in:
Dan Fandrich 2014-02-08 13:59:40 +01:00
parent 6b9a3c1865
commit 6374ab2a36

View File

@ -1111,7 +1111,7 @@ static CURLcode formdata_add_filename(const struct curl_httppost *file,
/* filename need be escaped */ /* filename need be escaped */
filename_escaped = malloc(strlen(filename)*2+1); filename_escaped = malloc(strlen(filename)*2+1);
if(!filename_escaped) { if(!filename_escaped) {
free(filebasename); Curl_safefree(filebasename);
return CURLE_OUT_OF_MEMORY; return CURLE_OUT_OF_MEMORY;
} }
p0 = filename_escaped; p0 = filename_escaped;