aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 3a9a7fdc1a9..8476ea44d68 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -797,7 +797,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;