diff options
author | Florin Coras <fcoras@cisco.com> | 2024-06-12 10:14:40 -0700 |
---|---|---|
committer | Florin Coras <fcoras@cisco.com> | 2024-06-12 10:14:40 -0700 |
commit | 6c37845a87588da8082b931bfce8c680ba1a9ad6 (patch) | |
tree | edba04672281c11cfadcd47f226777dba474051f /src | |
parent | 56387407c33f8aadc35b93d8c4e7b17b1b90a19e (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
Diffstat (limited to 'src')
-rw-r--r-- | src/vnet/session/session.c | 3 |
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; } |