From cf9d53fd63f3408551050e01aa81429902cf5663 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Mon, 6 Apr 2009 21:41:04 -0700 Subject: Cancel thread in work_queue_free If shutting down, thread may still be pending, so cancel it. Fixes one possible OOPS in BGP --- lib/workqueue.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/workqueue.c') 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); -- cgit v1.2.3