hsa: fix coverity warning
[vpp.git] / src / plugins / hs_apps / echo_client.c
index 344f4af..453cbed 100644 (file)
@@ -530,6 +530,11 @@ ec_ctrl_send (hs_test_cmd_t cmd)
     }
 
   s = session_get_from_handle_if_valid (ecm->ctrl_session_handle);
+  if (!s)
+    {
+      ec_err ("ctrl session not found");
+      return -1;
+    }
 
   ec_dbg ("sending test paramters to the server..");
   if (ecm->cfg.verbose)