aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_formparse.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index 719e3413f..5313b3441 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -451,11 +451,10 @@ static CURLcode file_or_stdin(curl_mimepart *part, const char *file)
if(strcmp(file, "-"))
return curl_mime_filedata(part, file);
- sip = (standard_input *) malloc(sizeof *sip);
+ sip = (standard_input *) calloc(1, sizeof *sip);
if(!sip)
return CURLE_OUT_OF_MEMORY;
- memset((char *) sip, 0, sizeof *sip);
set_binmode(stdin);
/* If stdin is a regular file, do not buffer data but read it when needed. */