bgp_address_destroy became per-bgp instance. Moved the
call to the bgp_address_destroy function to the bgp delete.
Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit
637035710a2f8e1e5944ee714135b7f88ac15ac4)
{
struct bgp *bgp;
struct listnode *node, *nnode;
- extern struct zclient *zclient;
/* it only makes sense for this to be called on a clean exit */
assert (status == 0);
bgp_vrf_terminate ();
cmd_terminate ();
vty_terminate ();
- if (zclient)
- zclient_free (zclient);
+
+ bgp_zebra_destroy();
if (bgp_nexthop_buf)
stream_free (bgp_nexthop_buf);
if (bgp_ifindices_buf)
/* Free interfaces in this instance. */
bgp_if_finish (bgp);
+ bgp_address_destroy (bgp);
+
thread_master_free_unused(bm->master);
bgp_unlock(bgp); /* initial reference */