aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/formdata.c4
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;