]> git.puffer.fish Git - matthieu/frr.git/commitdiff
bgpd: Fix call of bgp_address_destroy
authorDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 6 Sep 2016 00:03:19 +0000 (20:03 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Tue, 6 Sep 2016 16:32:22 +0000 (12:32 -0400)
We were prematurely deleting the bgp->address_hash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd/bgpd.c

index 3af35e537889818388427676644eedd65a438e98..87e5c54ea2958888ac9c0c71ba718cea621526b6 100644 (file)
@@ -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)