Skip to content
Snippets Groups Projects
Commit a028c69f authored by Dan Fandrich's avatar Dan Fandrich
Browse files

Avoid creating garbage on an OOM error

parent 4e4b6de5
No related branches found
No related tags found
No related merge requests found
......@@ -1211,8 +1211,11 @@ CURLcode Curl_getFormData(struct FormData **finalform,
char *filebasename= NULL;
if(!file->showfilename) {
filebasename = strippath(file->contents);
if(!filebasename)
if(!filebasename) {
Curl_formclean(&firstform);
free(boundary);
return CURLE_OUT_OF_MEMORY;
}
}
result = AddFormDataf(&form, &size,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment