mirror of
https://github.com/curl/curl.git
synced 2026-07-24 12:17:16 +03:00
smtp: fix memory leak in OOM
Regression since ce0881edee
Coverity CID 1418139 and CID 1418136 found it, but it was also seen in
torture testing.
This commit is contained in:
parent
7f794a224e
commit
1e548f7784
1 changed files with 4 additions and 1 deletions
|
|
@ -550,8 +550,11 @@ static CURLcode smtp_perform_mail(struct connectdata *conn)
|
|||
if(!result)
|
||||
result = Curl_mime_rewind(&data->set.mimepost);
|
||||
|
||||
if(result)
|
||||
if(result) {
|
||||
free(from);
|
||||
free(auth);
|
||||
return result;
|
||||
}
|
||||
|
||||
data->state.infilesize = Curl_mime_size(&data->set.mimepost);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue