mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-01 22:58:50 -04:00
use _list_consume to destroy objects
This commit is contained in:
parent
ec1d7b8df7
commit
39240fb9c0
10 changed files with 40 additions and 37 deletions
|
|
@ -680,13 +680,13 @@ static int impl_get_interface(struct spa_handle *handle, uint32_t type, void **i
|
|||
static int impl_clear(struct spa_handle *handle)
|
||||
{
|
||||
struct impl *impl;
|
||||
struct source_impl *source, *tmp;
|
||||
struct source_impl *source;
|
||||
|
||||
spa_return_val_if_fail(handle != NULL, -EINVAL);
|
||||
|
||||
impl = (struct impl *) handle;
|
||||
|
||||
spa_list_for_each_safe(source, tmp, &impl->source_list, link)
|
||||
spa_list_consume(source, &impl->source_list, link)
|
||||
loop_destroy_source(&source->source);
|
||||
|
||||
process_destroy(impl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue