From 1a5bc0e4ffef4e8baef9f3554ba3184fbc674211 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sat, 25 Mar 2017 14:44:08 +0100 Subject: Fix memory leak after processing udev_device MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- tdecore/tdehw/tdehardwaredevices.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tdecore') diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp index 257a22a41..a5cbffc34 100644 --- a/tdecore/tdehw/tdehardwaredevices.cpp +++ b/tdecore/tdehw/tdehardwaredevices.cpp @@ -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; parentdev = udev_device_new_from_syspath(m_udevStruct, parentsyspathudev.ascii()); devicenode = (udev_device_get_devnode(parentdev)); + udev_device_unref(parentdev); } } else if (usbInterfaceClass == 9) { -- cgit v1.2.1