diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-12 08:27:24 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-12 08:27:24 -0400 |
| commit | 991ae35b176208e946558f97ed9ab947e832e17c (patch) | |
| tree | 152b33ead5af6c1313d385571c3dc98a0e440db9 /lib/thread.c | |
| parent | e88500859aa6eeb84fd8ec36d30407bc169ac2f3 (diff) | |
| parent | 45082064cbc498a1f4287f411512a8183f0065d6 (diff) | |
Merge pull request #793 from opensourcerouting/hash-double-init
lib: init & cleanup fixes
Diffstat (limited to 'lib/thread.c')
| -rw-r--r-- | lib/thread.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/thread.c b/lib/thread.c index 4e72d4c96f..26fb46e49b 100644 --- a/lib/thread.c +++ b/lib/thread.c @@ -564,6 +564,12 @@ thread_master_free_unused (struct thread_master *m) void thread_master_free (struct thread_master *m) { + pthread_mutex_lock (&masters_mtx); + { + listnode_delete (masters, m); + } + pthread_mutex_unlock (&masters_mtx); + thread_array_free (m, m->read); thread_array_free (m, m->write); thread_queue_free (m, m->timer); |
