Fix memory leak after processing udev_device

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 1a5bc0e4ff)
pull/16/head
Slávek Banko 8 years ago
parent 164063ce4e
commit 9ef769d0e5

@ -465,6 +465,7 @@ void TDEHardwareDevices::processHotPluggedHardware() {
} }
} }
} }
udev_device_unref(dev);
} }
} }
@ -2345,6 +2346,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 { else {

Loading…
Cancel
Save