http: fix setting event on the last tx

pull/3421/head
Victor Julien 7 years ago
parent 62e6e0eb3c
commit 83e7ddf41f

@ -250,6 +250,8 @@ static void HTPSetEvent(HtpState *s, HtpTxUserData *htud, uint8_t e)
}
htp_tx_t *tx = HTPStateGetTx(s, s->transaction_cnt);
if (tx == NULL && s->transaction_cnt > 0)
tx = HTPStateGetTx(s, s->transaction_cnt - 1);
if (tx != NULL) {
htud = (HtpTxUserData *) htp_tx_get_user_data(tx);
if (htud != NULL) {

Loading…
Cancel
Save