Signed-off-by: Lou Berger <[email protected]>
---
 bgpd/bgp_nexthop.c     | 2 ++
 tests/bgp_mpath_test.c | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/bgpd/bgp_nexthop.c b/bgpd/bgp_nexthop.c
index 7dbaf3c..d3e5821 100644
--- a/bgpd/bgp_nexthop.c
+++ b/bgpd/bgp_nexthop.c
@@ -592,6 +592,8 @@ bgp_address_init (void)
 void
 bgp_address_destroy (void)
 {
+  if (bgp_address_hash == NULL)
+    return;
   hash_clean(bgp_address_hash, NULL); 
   hash_free(bgp_address_hash); 
   bgp_address_hash = NULL;
diff --git a/tests/bgp_mpath_test.c b/tests/bgp_mpath_test.c
index ed54d9c..744ea65 100644
--- a/tests/bgp_mpath_test.c
+++ b/tests/bgp_mpath_test.c
@@ -388,7 +388,8 @@ global_test_init (void)
 static int
 global_test_cleanup (void)
 {
-  zclient_free (zclient);
+  if (zclient != NULL)
+    zclient_free (zclient);
   thread_master_free (master);
   return 0;
 }
-- 
2.1.3


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

Reply via email to