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:
George Kiagiadakis 2019-11-16 11:40:02 +02:00
parent 73978f76aa
commit 4ad4974f27
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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