OSPF: Setting a list node NULL before use

This commit is contained in:
Maria Matejka 2021-05-27 10:35:38 +02:00
parent 923a6644b2
commit ceef6de459

View file

@ -522,7 +522,10 @@ static inline void
add_nbma_node(struct ospf_iface *ifa, struct nbma_node *src, int found) add_nbma_node(struct ospf_iface *ifa, struct nbma_node *src, int found)
{ {
struct nbma_node *n = mb_alloc(ifa->pool, sizeof(struct nbma_node)); struct nbma_node *n = mb_alloc(ifa->pool, sizeof(struct nbma_node));
n->n = (node) {};
add_tail(&ifa->nbma_list, NODE n); add_tail(&ifa->nbma_list, NODE n);
n->ip = src->ip; n->ip = src->ip;
n->eligible = src->eligible; n->eligible = src->eligible;
n->found = found; n->found = found;