diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-06 21:41:04 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-04-06 21:41:04 -0700 |
commit | cf9d53fd63f3408551050e01aa81429902cf5663 (patch) | |
tree | cf6d51811fbde29fe463f28ee2614e8612af0797 /lib/workqueue.c | |
parent | 5e1e192bbce8b76b09689f0b98af88f3e111508b (diff) | |
download | quagga-cf9d53fd63f3408551050e01aa81429902cf5663.tar.bz2 quagga-cf9d53fd63f3408551050e01aa81429902cf5663.tar.xz |
Cancel thread in work_queue_free
If shutting down, thread may still be pending, so cancel it.
Fixes one possible OOPS in BGP
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r-- | lib/workqueue.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c index 1d32d241..0dd36d82 100644 --- a/lib/workqueue.c +++ b/lib/workqueue.c @@ -91,6 +91,9 @@ work_queue_new (struct thread_master *m, const char *queue_name) void work_queue_free (struct work_queue *wq) { + if (wq->thread) + thread_cancel(wq->thread); + /* list_delete frees items via callback */ list_delete (wq->items); listnode_delete (&work_queues, wq); |