summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2024-06-12 10:14:40 -0700
committerFlorin Coras <fcoras@cisco.com>2024-06-12 10:14:40 -0700
commit6c37845a87588da8082b931bfce8c680ba1a9ad6 (patch)
treeedba04672281c11cfadcd47f226777dba474051f
parent56387407c33f8aadc35b93d8c4e7b17b1b90a19e (diff)
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 <fcoras@cisco.com> Change-Id: I2311fb763076aa8a263c193f5967793402eedb6a
-rw-r--r--src/vnet/session/session.c3
1 files changed, 2 insertions, 1 deletions
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;
}