summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2016-01-12 13:42:03 -0500
committerPaul Jakma <paul.jakma@hpe.com>2016-02-26 14:11:44 +0000
commit637035710a2f8e1e5944ee714135b7f88ac15ac4 (patch)
tree857f655fcd45e10f2947457f66e3a0d293c89955
parent298cc2f688dbadf0a447fcd06ae8e20fa5006ce4 (diff)
downloadquagga-637035710a2f8e1e5944ee714135b7f88ac15ac4.tar.bz2
quagga-637035710a2f8e1e5944ee714135b7f88ac15ac4.tar.xz
bgp: Reorg cleanup to align process and bgp instance init/destroy
Signed-off-by: Lou Berger <lberger@labn.net>
-rw-r--r--bgpd/bgp_main.c6
-rw-r--r--bgpd/bgpd.c5
2 files changed, 3 insertions, 8 deletions
diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 591a6f93..11c73cea 100644
--- a/bgpd/bgp_main.c
+++ b/bgpd/bgp_main.c
@@ -227,7 +227,6 @@ bgp_exit (int status)
struct listnode *node, *nnode;
int *socket;
struct interface *ifp;
- extern struct zclient *zclient;
extern struct zclient *zlookup;
/* it only makes sense for this to be called on a clean exit */
@@ -314,8 +313,9 @@ bgp_exit (int status)
vrf_terminate ();
cmd_terminate ();
vty_terminate ();
- if (zclient)
- zclient_free (zclient);
+ bgp_address_destroy();
+ bgp_scan_destroy();
+ bgp_zebra_destroy();
if (zlookup)
zclient_free (zlookup);
if (bgp_nexthop_buf)
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index e70d3377..3caeeff9 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -2229,11 +2229,6 @@ bgp_delete (struct bgp *bgp)
*/
bgp_process_queues_drain_immediate();
- bgp_zebra_destroy();
- bgp_scan_destroy();
- bgp_address_destroy();
-
-
/* Remove visibility via the master list - there may however still be
* routes to be processed still referencing the struct bgp.
*/