diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-17 01:07:08 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-03-17 01:07:08 +0100 |
commit | 6233f087385b876557dc83ef16e10159d647a3bd (patch) | |
tree | eb27c1279c353c9dc7688a04864a39941cdd0bc2 /pimd | |
parent | pimd: Fix uninitialized access of req (diff) | |
download | frr-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.c | 35 |
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; } |