aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2020-09-23 10:31:27 -0700
committerDave Barach <openvpp@barachs.net>2020-09-23 22:15:17 +0000
commit1c0573da278bfdd899c78180444035c012f0368d (patch)
treefd0fb6375f7bfa0e3f183f8787184cd023c860ad
parenta079844cf01eea8a7085c2c03226ceb3d942838a (diff)
session: fix sapi coverity warning
Type: fix Signed-off-by: Florin Coras <fcoras@cisco.com> Change-Id: Ib00ac02eabb06a300d01697b89d97b26dd3c4330
-rw-r--r--src/vnet/session/session_api.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/vnet/session/session_api.c b/src/vnet/session/session_api.c
index 1403e67482c..e7f95d2dca4 100644
--- a/src/vnet/session/session_api.c
+++ b/src/vnet/session/session_api.c
@@ -1225,6 +1225,8 @@ sapi_send_fds (app_worker_t * app_wrk, int *fds, int n_fds)
app_ns = app_namespace_get (app->ns_index);
cs_index = appns_sapi_handle_sock_index (app_wrk->api_client_index);
cs = appns_sapi_get_socket (app_ns, cs_index);
+ if (PREDICT_FALSE (!cs))
+ return;
/* There's no payload for the message only the type */
smsg.type = APP_SAPI_MSG_TYPE_SEND_FDS;