From c0d217c4e832926be955067b52ab31804e9c09f0 Mon Sep 17 00:00:00 2001 From: anlan_cs Date: Sun, 13 Feb 2022 14:45:02 +0800 Subject: [PATCH] pimd: remove redundant code `ifchannel_rb` is already cleaned by `pim_ifchannel_delete_all`, so it should be removed. Signed-off-by: anlan_cs --- pimd/pim_iface.c | 8 -------- 1 file changed, 8 deletions(-) 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; -- 2.39.5