summaryrefslogtreecommitdiffstats
path: root/lib/workqueue.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/workqueue.c')
-rw-r--r--lib/workqueue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/workqueue.c b/lib/workqueue.c
index 0dd36d82..7c811edd 100644
--- a/lib/workqueue.c
+++ b/lib/workqueue.c
@@ -91,9 +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);
-
+ if (wq->thread != NULL)
+ thread_cancel(wq->thread);
+
/* list_delete frees items via callback */
list_delete (wq->items);
listnode_delete (&work_queues, wq);