summaryrefslogtreecommitdiff
path: root/bgpd/bgpd.c
diff options
context:
space:
mode:
authorpaul <paul>2005-06-15 19:15:35 +0000
committerpaul <paul>2005-06-15 19:15:35 +0000
commite210cf9fd09c938b92dc1a993b254d8d5a8b312c (patch)
tree635e23a3f56c05f3cc89bddb5b7030ef0b7d13bc /bgpd/bgpd.c
parent245a2b29a501bad850c5399ac1c1da2fddf0572a (diff)
2005-06-15 Paul Jakma <paul.jakma@sun.com>
* bgpd.c: (bgp_terminate) workqueue's are lazy allocated and its possible to terminate bgpd before workqueues were setup, causing an abort/crash. Reported by Ashish Mehta of Sun.
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r--bgpd/bgpd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index 83cf9a8d..9473d6f8 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -4977,7 +4977,9 @@ bgp_terminate ()
BGP_NOTIFY_CEASE_PEER_UNCONFIG);
bgp_cleanup_routes ();
- work_queue_free (bm->process_main_queue);
- work_queue_free (bm->process_rsclient_queue);
+ if (bm->process_main_queue)
+ work_queue_free (bm->process_main_queue);
+ if (bm->process_rsclient_queue)
+ work_queue_free (bm->process_rsclient_queue);
}