mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: clean up our memory mappings
Loop over our memory mappings and clean them up when we are destroyed.
This commit is contained in:
parent
ff8aaf9e62
commit
0430e7b8dc
1 changed files with 5 additions and 0 deletions
|
|
@ -1324,6 +1324,8 @@ static void node_free(void *data)
|
|||
struct pw_impl_client_node *this = &impl->this;
|
||||
struct node *node = &impl->node;
|
||||
struct spa_system *data_system = node->data_system;
|
||||
uint32_t tag[5] = { impl->node_id, };
|
||||
struct pw_memmap *mm;
|
||||
|
||||
this->node = NULL;
|
||||
|
||||
|
|
@ -1332,6 +1334,9 @@ static void node_free(void *data)
|
|||
|
||||
spa_hook_remove(&impl->node_listener);
|
||||
|
||||
while ((mm = pw_mempool_find_tag(impl->context->pool, tag, sizeof(uint32_t))) != NULL)
|
||||
pw_memmap_free(mm);
|
||||
|
||||
if (this->resource)
|
||||
pw_resource_destroy(this->resource);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue