aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session_api.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 615e2ade59c..2502ef6a70a 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1485,7 +1485,9 @@ sapi_socket_detach (app_namespace_t * app_ns, clib_socket_t * cs)
/* Cleanup everything because app worker closed socket or crashed */
handle = (app_ns_api_handle_t *) & cs->private_data;
- app_wrk = app_worker_get (handle->aah_app_wrk_index);
+ app_wrk = app_worker_get_if_valid (handle->aah_app_wrk_index);
+ if (!app_wrk)
+ return;
vnet_app_worker_add_del_args_t args = {
.app_index = app_wrk->app_index,