summaryrefslogtreecommitdiffstats
path: root/tdecore
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-03-25 14:44:08 +0100
committerSlávek Banko <slavek.banko@axis.cz>2017-03-25 14:44:23 +0100
commit9ef769d0e58f8d77e006f77c3baad5d300260a45 (patch)
tree1cbec7aaf58dbba9c90e1a12e3b0bc4a32c2b890 /tdecore
parent164063ce4e9e049deff99f8dd03fcf8f36cfd301 (diff)
downloadtdelibs-9ef769d0e58f8d77e006f77c3baad5d300260a45.tar.gz
tdelibs-9ef769d0e58f8d77e006f77c3baad5d300260a45.zip
Fix memory leak after processing udev_device
Signed-off-by: Slávek Banko <slavek.banko@axis.cz> (cherry picked from commit 1a5bc0e4ffef4e8baef9f3554ba3184fbc674211)
Diffstat (limited to 'tdecore')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp2
1 files changed, 2 insertions, 0 deletions
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 {