Signed-off-by: Lou Berger <[email protected]>
---
 bgpd/bgp_main.c | 6 +++---
 bgpd/bgpd.c     | 5 -----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/bgpd/bgp_main.c b/bgpd/bgp_main.c
index 591a6f9..11c73ce 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 94a0514..95e4560 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.
    */
-- 
2.1.3


_______________________________________________
Quagga-dev mailing list
[email protected]
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to