Merge pull request #13623 from Keelan10/zebra-leak-fix

zebra: Delete the 'mbr_zifs' list in the if_zebra_delete_hook function
This commit is contained in:
Donatas Abraitis 2023-08-16 11:35:24 +03:00 committed by GitHub
commit 83a2d5ba69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -200,6 +200,7 @@ static void if_nhg_dependents_release(const struct interface *ifp)
static int if_zebra_delete_hook(struct interface *ifp)
{
struct zebra_if *zebra_if;
struct zebra_l2info_bond *bond;
if (ifp->info) {
zebra_if = ifp->info;
@ -217,6 +218,10 @@ static int if_zebra_delete_hook(struct interface *ifp)
rtadv_if_fini(zebra_if);
bond = &zebra_if->bond_info;
if (bond && bond->mbr_zifs)
list_delete(&bond->mbr_zifs);
zebra_l2_bridge_if_cleanup(ifp);
zebra_evpn_if_cleanup(zebra_if);
zebra_evpn_mac_ifp_del(ifp);