From 0ffc5016dd7062844f6e397be1cb616d7b022c2f Mon Sep 17 00:00:00 2001 From: Florin Coras Date: Tue, 28 Jun 2022 20:01:20 -0700 Subject: vcl: check if listener valid on disconnect cleanup Type: fix Signed-off-by: Florin Coras Change-Id: Ie057d0d5a51d3226a1a188cf9d48a5d82dc4a3c7 --- src/vcl/vppcom.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit 1.2.3-korg