From 6c37845a87588da8082b931bfce8c680ba1a9ad6 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 12 Jun 2024 10:14:40 -0700 Subject: session: fix ho cleanup on forced reset Avoid double free if app forces reset while half-open is cleaning up. Type: fix Signed-off-by: Florin Coras Change-Id: I2311fb763076aa8a263c193f5967793402eedb6a --- src/vnet/session/session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vnet/session') diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c index 32c987cc5d9..2ca867c166f 100644 --- a/src/vnet/session/session.c +++ b/src/vnet/session/session.c @@ -1689,7 +1689,8 @@ session_transport_reset (session_t * s) { if (s->session_state == SESSION_STATE_TRANSPORT_CLOSED) session_set_state (s, SESSION_STATE_CLOSED); - else if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED) + else if (s->session_state >= SESSION_STATE_TRANSPORT_DELETED && + !(s->flags & SESSION_F_HALF_OPEN)) session_program_cleanup (s); return; } -- cgit 1.2.3-korg