From 9cab992ff9aa0ab9b865ef2fff4ce7a633c54328 Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Wed, 20 Nov 2024 15:04:20 -0800 Subject: session: fix ct get peer if peer freed Type: fix Change-Id: Iae00637ab843121651f187436bf849f41874f48c Signed-off-by: Florin Coras --- src/vnet/session/application_local.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vnet/session/application_local.c b/src/vnet/session/application_local.c index afa39f6ded3..0800ce2b041 100644 --- a/src/vnet/session/application_local.c +++ b/src/vnet/session/application_local.c @@ -160,6 +160,8 @@ ct_session_get_peer (session_t * s) ct_connection_t *ct, *peer_ct; ct = ct_connection_get (s->connection_index, s->thread_index); peer_ct = ct_connection_get (ct->peer_index, s->thread_index); + if (!peer_ct) + return 0; return session_get (peer_ct->c_s_index, s->thread_index); } -- cgit 1.2.3-korg