summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-17 01:07:08 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-17 01:07:08 +0100
commit6233f087385b876557dc83ef16e10159d647a3bd (patch)
treeeb27c1279c353c9dc7688a04864a39941cdd0bc2 /pimd
parentpimd: Fix uninitialized access of req (diff)
downloadfrr-6233f087385b876557dc83ef16e10159d647a3bd.tar.xz
frr-6233f087385b876557dc83ef16e10159d647a3bd.zip
pimd: Fix connected data structure not being freed
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim_zebra.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index 3ff0d3818..727bceff5 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -338,26 +338,27 @@ static int pim_zebra_if_address_del(int command, struct zclient *client,
return 0;
p = c->address;
- if (p->family != AF_INET)
- return 0;
-
- if (PIM_DEBUG_ZEBRA) {
- char buf[BUFSIZ];
- prefix2str(p, buf, BUFSIZ);
- zlog_debug("%s: %s disconnected IP address %s flags %u %s",
- __PRETTY_FUNCTION__,
- c->ifp->name, buf, c->flags,
- CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY) ? "secondary" : "primary");
-
+ if (p->family == AF_INET)
+ {
+ if (PIM_DEBUG_ZEBRA) {
+ char buf[BUFSIZ];
+ prefix2str(p, buf, BUFSIZ);
+ zlog_debug("%s: %s disconnected IP address %s flags %u %s",
+ __PRETTY_FUNCTION__,
+ c->ifp->name, buf, c->flags,
+ CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY) ? "secondary" : "primary");
+
#ifdef PIM_DEBUG_IFADDR_DUMP
- dump_if_address(c->ifp);
+ dump_if_address(c->ifp);
#endif
- }
+ }
- pim_if_addr_del(c, 0);
- pim_rp_setup();
- pim_i_am_rp_re_evaluate();
-
+ pim_if_addr_del(c, 0);
+ pim_rp_setup();
+ pim_i_am_rp_re_evaluate();
+ }
+
+ connected_free (c);
return 0;
}