From 40cf4069c29cd98e6dd93b73f8f7f99d3c2309c3 Mon Sep 17 00:00:00 2001 From: Horatiu Vultur Date: Tue, 30 Jun 2020 11:57:22 +0200 Subject: [PATCH] Initialize the ports to 0 --- state_machine.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/state_machine.c b/state_machine.c index 11a2457..19b481e 100644 --- a/state_machine.c +++ b/state_machine.c @@ -1413,6 +1413,8 @@ static int mrp_port_init(uint32_t p_ifindex, struct mrp *mrp, if (!port) return -ENOMEM; + memset(port, 0x0, sizeof(struct mrp_port)); + port->mrp = mrp; port->ifindex = p_ifindex; if_get_mac(port->ifindex, port->macaddr);