mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user