From 36f45003414530868e93c220ea474a3e7e602ca7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 26 Nov 2019 19:07:26 +0100 Subject: [PATCH 037/181] 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 --- libfprint/fp-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libfprint/fp-device.c b/libfprint/fp-device.c index 13f1b5a..b2190bd 100644 --- a/libfprint/fp-device.c +++ b/libfprint/fp-device.c @@ -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); } -- 2.24.1