Commit 04ade3e7 authored by Bastien Nocera's avatar Bastien Nocera
Browse files

device: Fix leaks in _finalize()

Free up contents of the device structure on finalize(), now that
libfprint supports hotplug, we might need to not leak oozes of memory...

Closes: #12
parent 20760252
......@@ -150,9 +150,20 @@ static void fprint_device_finalize(GObject *object)
FprintDevice *self = (FprintDevice *) object;
FprintDevicePrivate *priv = fprint_device_get_instance_private(self);
g_hash_table_destroy (priv->clients);
/* FIXME: Cancel on-going operations */
g_clear_object (&priv->dev);
/* FIXME: Free DBusGMethodInvocation inside session ? */
g_clear_pointer(&priv->session, session_data_free);
/* FIXME close and stuff */
g_clear_pointer (&priv->clients, g_hash_table_destroy);
g_clear_object (&priv->auth);
g_clear_object (&priv->verify_data);
g_clear_pointer (&priv->identify_data, g_ptr_array_unref);
g_clear_object (&priv->current_cancellable);
/* FIXME: Free DBusGMethodInvocation current_cancel_context ? */
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