hsa: fix coverity warning 01/39801/2
authorFilip Tehlar <ftehlar@cisco.com>
Fri, 27 Oct 2023 07:56:41 +0000 (09:56 +0200)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 27 Oct 2023 15:28:29 +0000 (15:28 +0000)
Type: test

Change-Id: Iba94edb7eb439ddc994d9a16cb52108373d052ce
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
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)