smtp: check if there is a transaction to close

Ticket: 4948

When parsing the response for starttls

(cherry picked from commit 99b3443369)
pull/7189/head
Philippe Antoine 5 years ago committed by Shivani Bhardwaj
parent 0e9f42c744
commit e723ecb1ff

@ -1045,7 +1045,9 @@ static int SMTPProcessReply(SMTPState *state, Flow *f,
/* we are entering STARRTTLS data mode */
state->parser_state |= SMTP_PARSER_STATE_COMMAND_DATA_MODE;
AppLayerRequestProtocolTLSUpgrade(f);
SMTPTransactionComplete(state);
if (state->curr_tx) {
SMTPTransactionComplete(state);
}
} else {
/* decoder event */
SMTPSetEvent(state, SMTP_DECODER_EVENT_TLS_REJECTED);

Loading…
Cancel
Save