From 5e6d589c37ecf9c2d390e38718b8a42f766fd374 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 5 Sep 2016 20:03:19 -0400 Subject: [PATCH] bgpd: Fix call of bgp_address_destroy We were prematurely deleting the bgp->address_hash. Signed-off-by: Donald Sharp --- bgpd/bgpd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 3af35e5378..87e5c54ea2 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3178,8 +3178,6 @@ bgp_delete (struct bgp *bgp) /* Free interfaces in this instance. */ bgp_if_finish (bgp); - bgp_address_destroy (bgp); - thread_master_free_unused(bm->master); bgp_unlock(bgp); /* initial reference */ @@ -3229,6 +3227,8 @@ bgp_free (struct bgp *bgp) bgp_table_finish (&bgp->rib[afi][safi]); } + bgp_address_destroy (bgp); + /* If Default instance or VRF, unlink from the VRF structure. */ vrf = bgp_vrf_lookup_by_instance_type (bgp); if (vrf) -- 2.39.5