From 399495806c719d9e6a585430956482b27a308344 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Fri, 11 May 2018 14:34:20 -0400 Subject: [PATCH] pimd: Cleanup all pim_ifp pointers on termination Properly cleanup pim_ifp pointers on termination Signed-off-by: Donald Sharp --- pimd/pim_iface.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index 5996a3ac96..5c4d99ad4d 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -62,7 +62,16 @@ void pim_if_init(struct pim_instance *pim) void pim_if_terminate(struct pim_instance *pim) { - // Nothing to do at this moment + struct interface *ifp; + + FOR_ALL_INTERFACES (pim->vrf, ifp) { + struct pim_interface *pim_ifp = ifp->info; + + if (!pim_ifp) + continue; + + pim_if_delete(ifp); + } return; } -- 2.39.5