From: anlan_cs Date: Sun, 13 Feb 2022 06:45:02 +0000 (+0800) Subject: pimd: remove redundant code X-Git-Tag: pim6-testing-20220430~313^2 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=refs%2Fpull%2F10582%2Fhead;p=mirror%2Ffrr.git pimd: remove redundant code `ifchannel_rb` is already cleaned by `pim_ifchannel_delete_all`, so it should be removed. Signed-off-by: anlan_cs --- diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 3f138e22e5..6e5eba90e5 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -193,7 +193,6 @@ struct pim_interface *pim_if_new(struct interface *ifp, bool igmp, bool pim, void pim_if_delete(struct interface *ifp) { struct pim_interface *pim_ifp; - struct pim_ifchannel *ch; assert(ifp); pim_ifp = ifp->info; @@ -218,13 +217,6 @@ void pim_if_delete(struct interface *ifp) list_delete(&pim_ifp->sec_addr_list); XFREE(MTYPE_PIM_INTERFACE, pim_ifp->boundary_oil_plist); - - while (!RB_EMPTY(pim_ifchannel_rb, &pim_ifp->ifchannel_rb)) { - ch = RB_ROOT(pim_ifchannel_rb, &pim_ifp->ifchannel_rb); - - pim_ifchannel_delete(ch); - } - XFREE(MTYPE_PIM_INTERFACE, pim_ifp); ifp->info = NULL;