summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2021-05-27 10:35:38 +0200
committerMaria Matejka <mq@ucw.cz>2021-09-10 17:38:22 +0200
commitceef6de459b25d8fcc5dd416e0cecf179bd243e7 (patch)
tree190af9d47f3731f7cc17a30a73c718ee06ea5115
parent923a6644b206f70435c3d01b93b6880701938b49 (diff)
OSPF: Setting a list node NULL before use
-rw-r--r--proto/ospf/iface.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/ospf/iface.c b/proto/ospf/iface.c
index f38b8210..4cd45033 100644
--- a/proto/ospf/iface.c
+++ b/proto/ospf/iface.c
@@ -522,7 +522,10 @@ static inline void
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));
+
+ n->n = (node) {};
add_tail(&ifa->nbma_list, NODE n);
+
n->ip = src->ip;
n->eligible = src->eligible;
n->found = found;