mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-12-23 08:56:47 -05:00
impl: destroy node and device in global free
Destroy the node and device in the global free event. This way, the global resources are already destroyed and we have removed their ref to the spa node before we destroy that. Fixes #3588
This commit is contained in:
parent
c9c98312cb
commit
42418bece5
2 changed files with 4 additions and 4 deletions
|
|
@ -520,7 +520,7 @@ error_resource:
|
|||
return -errno;
|
||||
}
|
||||
|
||||
static void global_destroy(void *data)
|
||||
static void global_free(void *data)
|
||||
{
|
||||
struct pw_impl_device *device = data;
|
||||
spa_hook_remove(&device->global_listener);
|
||||
|
|
@ -530,7 +530,7 @@ static void global_destroy(void *data)
|
|||
|
||||
static const struct pw_global_events global_events = {
|
||||
PW_VERSION_GLOBAL_EVENTS,
|
||||
.destroy = global_destroy,
|
||||
.free = global_free,
|
||||
};
|
||||
|
||||
SPA_EXPORT
|
||||
|
|
|
|||
|
|
@ -669,7 +669,7 @@ error_resource:
|
|||
return -errno;
|
||||
}
|
||||
|
||||
static void global_destroy(void *data)
|
||||
static void global_free(void *data)
|
||||
{
|
||||
struct pw_impl_node *this = data;
|
||||
spa_hook_remove(&this->global_listener);
|
||||
|
|
@ -679,7 +679,7 @@ static void global_destroy(void *data)
|
|||
|
||||
static const struct pw_global_events global_events = {
|
||||
PW_VERSION_GLOBAL_EVENTS,
|
||||
.destroy = global_destroy,
|
||||
.free = global_free,
|
||||
};
|
||||
|
||||
static inline void insert_driver(struct pw_context *context, struct pw_impl_node *node)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue