mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
loop: free tss from the thread calling impl::clear
The thread that calls the impl_clear method might be the main thread and is certainly not going to call the invoke function anymore so free the tss if there is any. Fixes a leak in the unit test.
This commit is contained in:
parent
75566a238f
commit
5d3aac313d
1 changed files with 3 additions and 0 deletions
|
|
@ -1101,6 +1101,9 @@ static int impl_clear(struct spa_handle *handle)
|
|||
spa_list_consume(queue, &impl->queue_list, link)
|
||||
loop_queue_destroy(queue);
|
||||
|
||||
/* free the tss from this thread if any */
|
||||
free(tss_get(impl->queue_tss_id));
|
||||
|
||||
spa_system_close(impl->system, impl->poll_fd);
|
||||
pthread_mutex_destroy(&impl->queue_lock);
|
||||
tss_delete(impl->queue_tss_id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue