From 5dc3edf07ca7186a533283d94f25c2e545342b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= Date: Tue, 26 Nov 2019 19:16:07 +0100 Subject: [PATCH] fp-context: Run dispose on the usb context to deal with circular refs Ensure that we dispose the USB context before unreffing it, so that it will release any reference it has and destroy the internal libusb context. --- libfprint/fp-context.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libfprint/fp-context.c b/libfprint/fp-context.c index 74dda51..eed7847 100644 --- a/libfprint/fp-context.c +++ b/libfprint/fp-context.c @@ -186,6 +186,8 @@ fp_context_finalize (GObject *object) g_cancellable_cancel (priv->cancellable); g_clear_object (&priv->cancellable); g_clear_pointer (&priv->drivers, g_array_unref); + + g_object_run_dispose (G_OBJECT (priv->usb_ctx)); g_clear_object (&priv->usb_ctx); G_OBJECT_CLASS (fp_context_parent_class)->finalize (object);