mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-04 17:51:03 +00:00
[Unit-Tests] Tweak test framework, fail loading unit test when out of memory.
This commit is contained in:
parent
e1879a8e74
commit
28c170fda1
@ -743,6 +743,7 @@ fct_nlist__final(fct_nlist_t *list, fct_nlist_on_del_t on_del)
|
|||||||
FCT_ASSERT( list != NULL );
|
FCT_ASSERT( list != NULL );
|
||||||
fct_nlist__clear(list, on_del);
|
fct_nlist__clear(list, on_del);
|
||||||
free(list->itm_list);
|
free(list->itm_list);
|
||||||
|
list->itm_list = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2193,12 +2194,14 @@ should be directly from the program's main. */
|
|||||||
static int
|
static int
|
||||||
fctkern__init(fctkern_t *nk, int argc, const char *argv[])
|
fctkern__init(fctkern_t *nk, int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
|
int ok = 0;
|
||||||
if ( argc == 0 && argv == NULL )
|
if ( argc == 0 && argv == NULL )
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
memset(nk, 0, sizeof(fctkern_t));
|
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));
|
fct_nlist__init(&(nk->logger_list));
|
||||||
nk->lt_usr = NULL; /* Supplied via 'install' mechanics. */
|
nk->lt_usr = NULL; /* Supplied via 'install' mechanics. */
|
||||||
nk->lt_sys = FCT_LOGGER_TYPES;
|
nk->lt_sys = FCT_LOGGER_TYPES;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user