]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: remove redundant code 10582/head
authoranlan_cs <vic.lan@pica8.com>
Sun, 13 Feb 2022 06:45:02 +0000 (14:45 +0800)
committeranlan_cs <vic.lan@pica8.com>
Tue, 15 Feb 2022 14:49:37 +0000 (22:49 +0800)
`ifchannel_rb` is already cleaned by `pim_ifchannel_delete_all`, so
it should be removed.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
pimd/pim_iface.c

index 3f138e22e5bb39b097b25162f83e792633c08528..6e5eba90e5db5f03dbaec20e28915f771cad4044 100644 (file)
@@ -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;