summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2022-06-28 20:01:20 -0700
committerDave Wallace <dwallacelf@gmail.com>2022-06-29 11:55:45 +0000
commit0ffc5016dd7062844f6e397be1cb616d7b022c2f (patch)
tree1251afdad87e126c7402ea872f9d9bd27fe241ef /src
parent6777efdda0776b00c68d1fd36c02c33df93716dd (diff)
vcl: check if listener valid on disconnect cleanup
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ie057d0d5a51d3226a1a188cf9d48a5d82dc4a3c7
Diffstat (limited to 'src')
-rw-r--r--src/vcl/vppcom.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index 7fffc3bcbe2..342de0949a8 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -790,7 +790,8 @@ vppcom_session_disconnect (u32 session_handle)
if (session->listener_index != VCL_INVALID_SESSION_INDEX)
{
listen_session = vcl_session_get (wrk, session->listener_index);
- listen_session->n_accepted_sessions--;
+ if (listen_session)
+ listen_session->n_accepted_sessions--;
}
return VPPCOM_OK;