summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 4d689a9f88..9b2f5661ac 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -1094,7 +1094,8 @@ static void do_thread_cancel(struct thread_master *master)
}
/* Delete and free all cancellation requests */
- list_delete_all_node(master->cancel_req);
+ if (master->cancel_req)
+ list_delete_all_node(master->cancel_req);
/* Wake up any threads which may be blocked in thread_cancel_async() */
master->canceled = true;