From: Donald Sharp Date: Tue, 6 Sep 2016 00:03:19 +0000 (-0400) Subject: bgpd: Fix call of bgp_address_destroy X-Git-Tag: frr-2.0-rc1~328 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=5e6d589c37ecf9c2d390e38718b8a42f766fd374;p=matthieu%2Ffrr.git bgpd: Fix call of bgp_address_destroy We were prematurely deleting the bgp->address_hash. Signed-off-by: Donald Sharp --- 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)