thread-loop: fix leak of event

Destroy the event when the loop is destroyed
This commit is contained in:
Wim Taymans 2018-12-20 10:34:12 +01:00
parent c511b530ed
commit f8b156ac14

View file

@ -151,13 +151,15 @@ void pw_thread_loop_destroy(struct pw_thread_loop *loop)
pw_thread_loop_stop(loop);
free(loop->name);
pthread_mutex_destroy(&loop->lock);
pthread_cond_destroy(&loop->cond);
pthread_cond_destroy(&loop->accept_cond);
spa_hook_remove(&loop->hook);
pw_loop_destroy_source(loop->loop, loop->event);
pthread_cond_destroy(&loop->accept_cond);
pthread_cond_destroy(&loop->cond);
pthread_mutex_destroy(&loop->lock);
free(loop->name);
free(loop);
}