mirror of
https://gitlab.freedesktop.org/pipewire/wireplumber.git
synced 2026-05-05 04:18:07 +02:00
endpoint-link: ensure we call finalize of the parent class
This was causing a memory corruption and crash because the simple-endpoint-link was not calling finalize of the endpoint-link and the GWeakRefs pointing to the endpoints were not uninitialized, causing g_object_unref later to try to write to them (on free'ed memory)
This commit is contained in:
parent
73978f76aa
commit
4ad4974f27
2 changed files with 4 additions and 0 deletions
|
|
@ -787,6 +787,8 @@ endpoint_link_finalize (GObject * object)
|
|||
/* Clear the endpoint weak reaferences */
|
||||
g_weak_ref_clear(&priv->src);
|
||||
g_weak_ref_clear(&priv->sink);
|
||||
|
||||
G_OBJECT_CLASS (wp_endpoint_link_parent_class)->finalize(object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -107,6 +107,8 @@ simple_endpoint_link_finalize (GObject * object)
|
|||
g_clear_object (&self->init_task);
|
||||
g_clear_pointer (&self->link_proxies, g_ptr_array_unref);
|
||||
g_weak_ref_clear (&self->core);
|
||||
|
||||
G_OBJECT_CLASS (simple_endpoint_link_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue