fp-device: Unref the usb device on finalize

Each device adds a ref to the underlying usb device, but it doesn't remove
the reference on finalization.

So clear the object to fix the leak
This commit is contained in:
Marco Trevisan (Treviño) 2019-11-26 19:07:26 +01:00
parent c9216cf96c
commit 71625ec1cf

View file

@ -382,6 +382,7 @@ fp_device_finalize (GObject *object)
g_clear_pointer (&priv->device_id, g_free);
g_clear_pointer (&priv->device_name, g_free);
g_clear_object (&priv->usb_device);
G_OBJECT_CLASS (fp_device_parent_class)->finalize (object);
}