manager: Fix leak of FprintDevice reference

When adding a device a reference was leaked.
This commit is contained in:
Benjamin Berg
2020-11-17 20:58:42 +01:00
parent ec5cce083c
commit 9c842e2c2f

View File

@ -214,9 +214,11 @@ device_added_cb (FprintManager *manager, FpDevice *device, FpContext *context)
{
FprintManagerPrivate *priv = fprint_manager_get_instance_private (manager);
g_autoptr(FprintDBusObjectSkeleton) object = NULL;
FprintDevice *rdev = fprint_device_new(device);
g_autoptr(FprintDevice) rdev = NULL;
g_autofree gchar *path = NULL;
rdev = fprint_device_new(device);
g_signal_connect (G_OBJECT(rdev), "notify::in-use",
G_CALLBACK (fprint_manager_in_use_notified), manager);