]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Uninitialized list nodes fixes
authorMaria Matejka <mq@ucw.cz>
Sat, 17 Aug 2019 12:18:41 +0000 (14:18 +0200)
committerMaria Matejka <mq@ucw.cz>
Fri, 1 May 2020 13:19:12 +0000 (15:19 +0200)
lib/resource.c
nest/rt-table.c

index ab8c800f5b9e1cadb1ce20c1ea5bc4b31c6ff8c2..7e6243212be673aa25aeecfc0049a22480d7b56c 100644 (file)
@@ -340,6 +340,7 @@ mb_alloc(pool *p, unsigned size)
   struct mblock *b = xmalloc(sizeof(struct mblock) + size);
 
   b->r.class = &mb_class;
+  b->r.n = (node) {};
   add_tail(&p->inside, &b->r.n);
   b->size = size;
   return b->data;
index a46eeb77a3eb3f9e3719b91bc7ac7a6bd9ff2096..ae5a844497a7860655512232fa469fe1b68cf522 100644 (file)
@@ -2304,7 +2304,7 @@ rt_commit(struct config *new, struct config *old)
   WALK_LIST(r, new->tables)
     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);
        rt_setup(rt_table_pool, t, r);
        add_tail(&routing_tables, &t->n);