smtp: return value ignored

Return value from Curl_client_write was overwritten by
smtp_perform_command making errors ignored.

Pointed out by ZeroPath

Closes #19136
This commit is contained in:
Daniel Stenberg 2025-10-19 11:28:15 +02:00
parent f6334f379d
commit fffc16dd9c
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -1136,7 +1136,7 @@ static CURLcode smtp_state_command_resp(struct Curl_easy *data,
if(!data->req.no_body)
result = Curl_client_write(data, CLIENTWRITE_BODY, line, len);
if(smtpcode != 1) {
if(!result && (smtpcode != 1)) {
if(smtp->rcpt) {
smtp->rcpt = smtp->rcpt->next;