From c1ff3e67af2e375d8052c029c940904e75cbcc4b Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 25 Mar 2022 19:57:13 +0000 Subject: [PATCH] trivial: Fix a small memory leak when getting the udev parent --- libfwupdplugin/fu-udev-device.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libfwupdplugin/fu-udev-device.c b/libfwupdplugin/fu-udev-device.c index 8ce8fb3fb..5469d66e1 100644 --- a/libfwupdplugin/fu-udev-device.c +++ b/libfwupdplugin/fu-udev-device.c @@ -1922,8 +1922,7 @@ fu_udev_device_get_parent_with_subsystem(FuUdevDevice *self, const gchar *subsys device_tmp = g_udev_device_get_parent_with_subsystem(priv->udev_device, subsystem, NULL); if (device_tmp == NULL) return NULL; - return fu_udev_device_new_with_context(fu_device_get_context(FU_DEVICE(self)), - g_steal_pointer(&device_tmp)); + return fu_udev_device_new_with_context(fu_device_get_context(FU_DEVICE(self)), device_tmp); #else return NULL; #endif