diff options
author | Florin Coras <fcoras@cisco.com> | 2024-11-20 15:04:20 -0800 |
---|---|---|
committer | Dave Barach <vpp@barachs.net> | 2024-11-21 00:57:56 +0000 |
commit | 9cab992ff9aa0ab9b865ef2fff4ce7a633c54328 (patch) | |
tree | b1253e343f11cf36501dd8e4cad09df58cafef43 /src/vnet/session/application_local.c | |
parent | 79c8f99ac928ab6108b3dd854b2ad389c4809ebb (diff) |
session: fix ct get peer if peer freed
Type: fix
Change-Id: Iae00637ab843121651f187436bf849f41874f48c
Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/application_local.c')
-rw-r--r-- | src/vnet/session/application_local.c | 2 |
1 files changed, 2 insertions, 0 deletions
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); } |