From 9ef769d0e58f8d77e006f77c3baad5d300260a45 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 (cherry picked from commit 1a5bc0e4ffef4e8baef9f3554ba3184fbc674211) --- tdecore/tdehw/tdehardwaredevices.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp index 222bf41d5..ab77b4ca8 100644 --- a/tdecore/tdehw/tdehardwaredevices.cpp +++ b/tdecore/tdehw/tdehardwaredevices.cpp @@ -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; parentdev = udev_device_new_from_syspath(m_udevStruct, parentsyspathudev.ascii()); devicenode = (udev_device_get_devnode(parentdev)); + udev_device_unref(parentdev); } } else { -- cgit v1.2.1