summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session/session_api.c')
-rwxr-xr-xsrc/vnet/session/session_api.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 8f9ce3f5a1e..c55aab33541 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -968,10 +968,17 @@ vl_api_unbind_sock_t_handler (vl_api_unbind_sock_t * mp)
if ((rv = vnet_unlisten (a)))
clib_warning ("unlisten returned: %d", rv);
}
+ else
+ {
+ rv = VNET_API_ERROR_APPLICATION_NOT_ATTACHED;
+ }
done:
REPLY_MACRO (VL_API_UNBIND_SOCK_REPLY);
+ if (!app)
+ return;
+
app_wrk = application_get_worker (app, a->wrk_map_index);
if (!app_wrk)
return;