smtp: handle file open failure

Only call SMTPNewFile when FileOpenFileWithId succeeds.

Ticket: #8813
pull/16213/head
Jason Ish 2 months ago committed by Victor Julien
parent 60dc5d0e75
commit dca5cb3ab4

@ -929,8 +929,9 @@ static int SMTPProcessCommandDATA(
state->file_track_id++, filename, filename_len, NULL, 0,
flags) != 0) {
SCLogDebug("FileOpenFile() failed");
} else {
SMTPNewFile(state->curr_tx, tx->files_ts.tail);
}
SMTPNewFile(state->curr_tx, tx->files_ts.tail);
break;
case MimeSmtpFileChunk:
// rust already run FileAppendData

Loading…
Cancel
Save