summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-08-24 13:58:49 -0700
committerFlorin Coras <fcoras@cisco.com>2018-08-24 13:58:49 -0700
commitc3638fece1a3b96349b7df11261e6661b101ccbe (patch)
tree2f97828a4d6b9c51fe4ad1d75c1a4fee4f8e52c9 /src/vnet/session/session_node.c
parent1553197f9a1a3258b6954adeb9536bbe0191683d (diff)
session: fix coverity warnings
Change-Id: I2a25bba675fc9c84e5d391533e92b9a041637405 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 1656e2eed0e..fcb3a3dc016 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -132,12 +132,16 @@ session_mq_disconnected_handler (void *data)
int rv = 0;
mp = (session_disconnected_msg_t *) data;
- s = session_get_from_handle_if_valid (mp->handle);
+ if (!(s = session_get_from_handle_if_valid (mp->handle)))
+ {
+ clib_warning ("could not disconnect handle %llu", mp->handle);
+ return;
+ }
app_wrk = app_worker_get (s->app_wrk_index);
app = application_lookup (mp->client_index);
- if (!(app_wrk && s && app->app_index == app_wrk->app_index))
+ if (!(app_wrk && app && app->app_index == app_wrk->app_index))
{
- clib_warning ("could not disconnect session: %llu app_wrk: %u",
+ clib_warning ("could not disconnect session: %llu app: %u",
mp->handle, mp->client_index);
return;
}