mirror of
https://git.proxmox.com/git/fwupd
synced 2025-07-27 12:54:58 +00:00
trivial: Fix a small memory leak when getting the udev parent
This commit is contained in:
parent
1241e156b9
commit
c1ff3e67af
@ -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);
|
device_tmp = g_udev_device_get_parent_with_subsystem(priv->udev_device, subsystem, NULL);
|
||||||
if (device_tmp == NULL)
|
if (device_tmp == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return fu_udev_device_new_with_context(fu_device_get_context(FU_DEVICE(self)),
|
return fu_udev_device_new_with_context(fu_device_get_context(FU_DEVICE(self)), device_tmp);
|
||||||
g_steal_pointer(&device_tmp));
|
|
||||||
#else
|
#else
|
||||||
return NULL;
|
return NULL;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user