mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-17 07:00:03 -05:00
thread-loop: fix leak of event
Destroy the event when the loop is destroyed
This commit is contained in:
parent
52a3a0c175
commit
0c0bf3a62a
1 changed files with 7 additions and 5 deletions
|
|
@ -156,13 +156,15 @@ void pw_thread_loop_destroy(struct pw_thread_loop *loop)
|
||||||
|
|
||||||
pw_thread_loop_stop(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);
|
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);
|
free(loop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue