summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
authorLou Berger <lberger@labn.net>2017-10-05 14:57:05 -0400
committerGitHub <noreply@github.com>2017-10-05 14:57:05 -0400
commit76ae8092db11aa40198f71424103b484675d4d62 (patch)
tree9f6095d8c4c99171f57189db8396870d9f2c9740 /lib/thread.c
parent9772d7297920b2c6947886488fa2b07ead8e8fe0 (diff)
parentacdf5e25101bafe334e6b500c3dd0a2babb3c1ec (diff)
Merge pull request #1264 from donaldsharp/linklist
Linklist api cleanup
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/thread.c b/lib/thread.c
index a69bd2f0d5..2d37857b8a 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);
@@ -570,7 +569,7 @@ void thread_master_free(struct thread_master *m)
pthread_cond_destroy(&m->cancel_cond);
close(m->io_pipe[0]);
close(m->io_pipe[1]);
- list_delete(m->cancel_req);
+ list_delete_and_null(&m->cancel_req);
m->cancel_req = NULL;
hash_clean(m->cpu_record, cpu_record_hash_free);