summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_api.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-08-27 15:13:35 -0700
committerDamjan Marion <dmarion@me.com>2019-08-28 15:04:19 +0000
commiteef61bb81a22f4c61c01e5afc8bd3b8612a71534 (patch)
treefe89bd11bbc9f755b8fbb52baf785b26590066e5 /src/vnet/session/session_api.c
parent50059cca899117f7d3d2de616ada05166ccd1c97 (diff)
session: fix unbind coverity warning
Type:fix Change-Id: If4fce6bd9b06ed545d72df847afd6a74cdefe042 Signed-off-by: Florin Coras <fcoras@cisco.com>
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;