summaryrefslogtreecommitdiff
path: root/lib/thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/thread.c')
-rw-r--r--lib/thread.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/thread.c b/lib/thread.c
index 8324783a7b..87ad3d8823 100644
--- a/lib/thread.c
+++ b/lib/thread.c
@@ -724,9 +724,7 @@ void thread_master_free(struct thread_master *m)
list_delete(&m->cancel_req);
m->cancel_req = NULL;
- hash_clean(m->cpu_record, cpu_record_hash_free);
- hash_free(m->cpu_record);
- m->cpu_record = NULL;
+ hash_clean_and_free(&m->cpu_record, cpu_record_hash_free);
XFREE(MTYPE_THREAD_MASTER, m->name);
XFREE(MTYPE_THREAD_MASTER, m->handler.pfds);