summaryrefslogtreecommitdiffstats
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, 1 insertions, 2 deletions
diff --git a/lib/thread.c b/lib/thread.c
index fce8dee16..2d37857b8 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -554,8 +554,7 @@ void thread_master_free(struct thread_master *m)
{
listnode_delete(masters, m);
if (masters->count == 0) {
- list_free(masters);
- masters = NULL;
+ list_delete_and_null(&masters);
}
}
pthread_mutex_unlock(&masters_mtx);