From: vivek Date: Sat, 14 May 2016 23:07:18 +0000 (-0700) Subject: BGP: Unlink BGP instance from VRF only at the end of deletion X-Git-Tag: frr-2.0-rc1~911 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=4ac823211587a8bf4cd7676784b5199e44310a31;p=mirror%2Ffrr.git BGP: Unlink BGP instance from VRF only at the end of deletion Additional change missed out in earlier commit. Updates d3f5a0d3f51a8a7f3f02c38bd4c1c6870b4b2a5b. Signed-off-by: Vivek Venkatraman Ticket: CM-10930 Reviewed By: CCR-4717 Testing Done: Manual, bgp-smoke --- diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 7dd88be952..2f7c584c2d 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -3144,9 +3144,6 @@ bgp_free (struct bgp *bgp) bgp->peerhash = NULL; } - if (bgp->name) - XFREE(MTYPE_BGP, bgp->name); - for (afi = AFI_IP; afi < AFI_MAX; afi++) for (safi = SAFI_UNICAST; safi < SAFI_MAX; safi++) { @@ -3163,6 +3160,9 @@ bgp_free (struct bgp *bgp) if (vrf) bgp_vrf_unlink (bgp, vrf); + if (bgp->name) + XFREE(MTYPE_BGP, bgp->name); + XFREE (MTYPE_BGP, bgp); }