Fix memory leak after processing udev_device

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/1/head
Slávek Banko 8 years ago
parent ab525f2baa
commit 1a5bc0e4ff

@ -466,6 +466,7 @@ void TDEHardwareDevices::processHotPluggedHardware() {
} }
} }
} }
udev_device_unref(dev);
} }
} }
@ -2392,6 +2393,7 @@ TDEGenericDevice* TDEHardwareDevices::classifyUnknownDevice(udev_device* dev, TD
struct udev_device *parentdev; struct udev_device *parentdev;
parentdev = udev_device_new_from_syspath(m_udevStruct, parentsyspathudev.ascii()); parentdev = udev_device_new_from_syspath(m_udevStruct, parentsyspathudev.ascii());
devicenode = (udev_device_get_devnode(parentdev)); devicenode = (udev_device_get_devnode(parentdev));
udev_device_unref(parentdev);
} }
} }
else if (usbInterfaceClass == 9) { else if (usbInterfaceClass == 9) {

Loading…
Cancel
Save