diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-05-13 14:13:12 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-05-13 14:13:12 +0000 |
commit | ccdcdb2a461839c9fd7f3306e24bd4a7a818a892 (patch) | |
tree | 33a2a665fd864727df01c14758e3d07bfc439ec9 /lib | |
parent | b121e41ec3ae3f5fe355d3802f4c3ddf0f50e190 (diff) |
mark a value as alloced when strdup()ed to prevent memory leaks
Diffstat (limited to 'lib')
-rw-r--r-- | lib/formdata.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/formdata.c b/lib/formdata.c index 80941655a..671697aca 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -492,8 +492,10 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost, current_form->value = strdup(filename); if(!current_form->value) return_value = CURL_FORMADD_MEMORY; - else + else { current_form->flags |= HTTPPOST_READFILE; + current_form->value_alloc = TRUE; + } } else return_value = CURL_FORMADD_NULL; |