Commit d571bfe3 authored by Zeeshan Ali (Khattak)'s avatar Zeeshan Ali (Khattak)
Browse files

RootDevice delays description doc unref to finalize

Each service keeps a pointer to its node in the device description doc so
we could easily end-up service accessing an invalid node pointer in
situations where the service in question is not unrefed BEFORE the dispose
of the associated device is run.

This was the cause of rygel crashing if you hit CTRL^C at its initialization.
parent 631830c5
......@@ -65,6 +65,7 @@ gupnp_root_device_finalize (GObject *object)
device = GUPNP_ROOT_DEVICE (object);
g_object_unref (device->priv->description_doc);
g_free (device->priv->description_path);
g_free (device->priv->description_dir);
g_free (device->priv->relative_location);
......@@ -87,11 +88,6 @@ gupnp_root_device_dispose (GObject *object)
device->priv->group = NULL;
}
if (device->priv->description_doc) {
g_object_unref (device->priv->description_doc);
device->priv->description_doc = NULL;
}
/* Call super */
object_class = G_OBJECT_CLASS (gupnp_root_device_parent_class);
object_class->dispose (object);
......
Markdown is supported
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