mirror of
https://github.com/curl/curl.git
synced 2026-07-24 17:07:16 +03:00
Curl_http_body: cleanup properly when Curl_getformdata errors
Reported-by: yushicheng7788 on github Based-on-work-by: yushicheng7788 on github Fixes #12410 Closes #12421
This commit is contained in:
parent
0ca3a4ec9a
commit
34e319954a
1 changed files with 3 additions and 1 deletions
|
|
@ -2439,8 +2439,10 @@ CURLcode Curl_http_body(struct Curl_easy *data, struct connectdata *conn,
|
|||
Curl_mime_cleanpart(data->state.formp);
|
||||
result = Curl_getformdata(data, data->state.formp, data->set.httppost,
|
||||
data->state.fread_func);
|
||||
if(result)
|
||||
if(result) {
|
||||
Curl_safefree(data->state.formp);
|
||||
return result;
|
||||
}
|
||||
data->state.mimepost = data->state.formp;
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue