diff --git a/src/include/test/switch_fct.h b/src/include/test/switch_fct.h index ab70d882c5..a9b3595d0e 100644 --- a/src/include/test/switch_fct.h +++ b/src/include/test/switch_fct.h @@ -743,6 +743,7 @@ fct_nlist__final(fct_nlist_t *list, fct_nlist_on_del_t on_del) FCT_ASSERT( list != NULL ); fct_nlist__clear(list, on_del); free(list->itm_list); + list->itm_list = NULL; } @@ -2193,12 +2194,14 @@ should be directly from the program's main. */ static int fctkern__init(fctkern_t *nk, int argc, const char *argv[]) { + int ok = 0; if ( argc == 0 && argv == NULL ) { return 0; } memset(nk, 0, sizeof(fctkern_t)); - fct_clp__init(&(nk->cl_parser), NULL); + ok = fct_clp__init(&(nk->cl_parser), NULL); + if (!ok) return ok; fct_nlist__init(&(nk->logger_list)); nk->lt_usr = NULL; /* Supplied via 'install' mechanics. */ nk->lt_sys = FCT_LOGGER_TYPES;