Commit 4ad4974f authored by George Kiagiadakis's avatar George Kiagiadakis
Browse files

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)
parent 73978f76
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment