mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
Uninitialized list nodes fixes
This commit is contained in:
parent
72e97dc983
commit
7b91a3473c
@ -462,7 +462,7 @@ bt_test_suite:
|
|||||||
if (!($3->class & SYM_FUNCTION))
|
if (!($3->class & SYM_FUNCTION))
|
||||||
cf_error("Function expected");
|
cf_error("Function expected");
|
||||||
|
|
||||||
struct f_bt_test_suite *t = cfg_alloc(sizeof(struct f_bt_test_suite));
|
struct f_bt_test_suite *t = cfg_allocz(sizeof(struct f_bt_test_suite));
|
||||||
t->fn = $3->def;
|
t->fn = $3->def;
|
||||||
t->fn_name = $3->name;
|
t->fn_name = $3->name;
|
||||||
t->dsc = $5;
|
t->dsc = $5;
|
||||||
|
@ -340,6 +340,7 @@ mb_alloc(pool *p, unsigned size)
|
|||||||
struct mblock *b = xmalloc(sizeof(struct mblock) + size);
|
struct mblock *b = xmalloc(sizeof(struct mblock) + size);
|
||||||
|
|
||||||
b->r.class = &mb_class;
|
b->r.class = &mb_class;
|
||||||
|
b->r.n = (node) {};
|
||||||
add_tail(&p->inside, &b->r.n);
|
add_tail(&p->inside, &b->r.n);
|
||||||
b->size = size;
|
b->size = size;
|
||||||
return b->data;
|
return b->data;
|
||||||
|
@ -2301,7 +2301,7 @@ rt_commit(struct config *new, struct config *old)
|
|||||||
WALK_LIST(r, new->tables)
|
WALK_LIST(r, new->tables)
|
||||||
if (!r->table)
|
if (!r->table)
|
||||||
{
|
{
|
||||||
rtable *t = mb_alloc(rt_table_pool, sizeof(struct rtable));
|
rtable *t = mb_allocz(rt_table_pool, sizeof(struct rtable));
|
||||||
DBG("\t%s: created\n", r->name);
|
DBG("\t%s: created\n", r->name);
|
||||||
rt_setup(rt_table_pool, t, r);
|
rt_setup(rt_table_pool, t, r);
|
||||||
add_tail(&routing_tables, &t->n);
|
add_tail(&routing_tables, &t->n);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user