hsa: http client set connect_sep to null on init 57/43457/2
authorMatus Fabian <[email protected]>
Fri, 18 Jul 2025 09:43:10 +0000 (05:43 -0400)
committerFlorin Coras <[email protected]>
Sun, 20 Jul 2025 20:05:41 +0000 (20:05 +0000)
Set connect_sep in http (cli) client to SESSION_ENDPOINT_CFG_NULL on
init to be sure that parrent_handle is invalid if not used.

Type: improvement

Change-Id: Ia42cbe8ea90402d20b07f933b5308642a098235f
Signed-off-by: Matus Fabian <[email protected]>
src/plugins/hs_apps/http_client.c
src/plugins/hs_apps/http_client_cli.c

index b6462be..97dbca7 100644 (file)
@@ -1182,7 +1182,10 @@ static clib_error_t *
 hc_main_init ()
 {
   hc_main_t *hcm = &hc_main;
+  session_endpoint_cfg_t sep_null = SESSION_ENDPOINT_CFG_NULL;
+
   hcm->app_index = APP_INVALID_INDEX;
+  hcm->connect_sep = sep_null;
   return 0;
 }
 
index f6247ea..3980cd9 100644 (file)
@@ -654,9 +654,11 @@ static clib_error_t *
 hcc_main_init (vlib_main_t *vm)
 {
   hcc_main_t *hcm = &hcc_main;
+  session_endpoint_cfg_t sep_null = SESSION_ENDPOINT_CFG_NULL;
 
   hcm->app_index = ~0;
   hcm->vlib_main = vm;
+  hcm->connect_sep = sep_null;
   return 0;
 }