mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
thread-loop: fix leak of event
Destroy the event when the loop is destroyed
This commit is contained in:
parent
c511b530ed
commit
f8b156ac14
1 changed files with 7 additions and 5 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue