Merge pull request #866 from signalwire/testframework
[Unit-Tests] Tweak test framework, fail loading unit test when out of memory.
This commit is contained in:
commit
be42709de6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue