projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2dae8a
)
formdata: Fixed memory leak on OOM condition
author
Dan Fandrich
<dan@coneharvesters.com>
Sat, 8 Feb 2014 10:33:43 +0000
(11:33 +0100)
committer
Dan Fandrich
<dan@coneharvesters.com>
Sat, 8 Feb 2014 10:33:43 +0000
(11:33 +0100)
lib/formdata.c
patch
|
blob
|
history
diff --git
a/lib/formdata.c
b/lib/formdata.c
index
bdca3e7
..
e307a28
100644
(file)
--- a/
lib/formdata.c
+++ b/
lib/formdata.c
@@
-1110,8
+1110,10
@@
static CURLcode formdata_add_filename(const struct curl_httppost *file,
/* filename need be escaped */
filename_escaped = malloc(strlen(filename)*2+1);
- if(!filename_escaped)
+ if(!filename_escaped) {
+ free(filebasename);
return CURLE_OUT_OF_MEMORY;
+ }
p0 = filename_escaped;
p1 = filename;
while(*p1) {