Session/tcp coverity fixes
Change-Id: Ic5467df16e870b49c49678b1dbb40f4a2390b3c9
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 79d67a2..5a02a08 100755
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -227,6 +227,12 @@
/* Tell the server the client's API queue address, so it can reply */
mp->client_queue_address = (u64) client_q;
app = application_lookup (mp->client_index);
+ if (!app)
+ {
+ clib_warning ("no client application");
+ return -1;
+ }
+
mp->options[SESSION_OPTIONS_RX_FIFO_SIZE] = app->sm_properties.rx_fifo_size;
mp->options[SESSION_OPTIONS_TX_FIFO_SIZE] = app->sm_properties.tx_fifo_size;