Avoid creating garbage on an OOM error

This commit is contained in:
Dan Fandrich 2008-11-18 19:58:44 +00:00
parent 4e4b6de5ce
commit a028c69f48

View File

@ -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,