smtp/files: don't modify prev file on open failure

pull/8209/head
Victor Julien 3 years ago
parent e601ebdfd8
commit 9f4dd4fc56

@ -529,8 +529,9 @@ int SMTPProcessDataChunk(const uint8_t *chunk, uint32_t len,
(uint8_t *)entity->filename, flen, (uint8_t *)chunk, len, flags) != 0) {
ret = MIME_DEC_ERR_DATA;
SCLogDebug("FileOpenFile() failed");
} else {
SMTPNewFile(tx, files->tail);
}
SMTPNewFile(tx, files->tail);
/* If close in the same chunk, then pass in empty bytes */
if (state->body_end) {

Loading…
Cancel
Save