mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-04 13:30:12 -05:00
client-node: improve cleanup
This commit is contained in:
parent
a54efe8581
commit
11830871df
2 changed files with 29 additions and 7 deletions
|
|
@ -1253,7 +1253,8 @@ static void client_node_resource_destroy(void *data)
|
|||
true,
|
||||
&node->data_source);
|
||||
}
|
||||
pw_node_destroy(this->node);
|
||||
if (this->node)
|
||||
pw_node_destroy(this->node);
|
||||
}
|
||||
|
||||
static void client_node_resource_error(void *data, int seq, int res, const char *message)
|
||||
|
|
@ -1348,13 +1349,19 @@ static void node_initialized(void *data)
|
|||
static void node_free(void *data)
|
||||
{
|
||||
struct impl *impl = data;
|
||||
struct pw_client_node *this = &impl->this;
|
||||
struct spa_system *data_system = impl->node.data_system;
|
||||
|
||||
this->node = NULL;
|
||||
|
||||
pw_log_debug(NAME " %p: free", &impl->this);
|
||||
node_clear(&impl->node);
|
||||
|
||||
spa_hook_remove(&impl->node_listener);
|
||||
|
||||
if (this->resource)
|
||||
pw_resource_destroy(this->resource);
|
||||
|
||||
pw_array_clear(&impl->mems);
|
||||
if (impl->io_areas)
|
||||
pw_memblock_free(impl->io_areas);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue