summaryrefslogtreecommitdiffstats
path: root/tdecore/tdehw
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2017-03-25 16:42:05 +0100
committerSlávek Banko <slavek.banko@axis.cz>2017-03-25 16:42:05 +0100
commitd2b61ae9dac0e38c8f2853a41a3fb194fd794cf7 (patch)
tree9a5d409ddaa91d46cf8821bc14945db20b5a1c3c /tdecore/tdehw
parent1a5bc0e4ffef4e8baef9f3554ba3184fbc674211 (diff)
downloadtdelibs-d2b61ae9dac0e38c8f2853a41a3fb194fd794cf7.tar.gz
tdelibs-d2b61ae9dac0e38c8f2853a41a3fb194fd794cf7.zip
Fix memory leak after processing udev_monitor
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'tdecore/tdehw')
-rw-r--r--tdecore/tdehw/tdehardwaredevices.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tdecore/tdehw/tdehardwaredevices.cpp b/tdecore/tdehw/tdehardwaredevices.cpp
index a5cbffc34..5669fe55c 100644
--- a/tdecore/tdehw/tdehardwaredevices.cpp
+++ b/tdecore/tdehw/tdehardwaredevices.cpp
@@ -236,6 +236,9 @@ TDEHardwareDevices::~TDEHardwareDevices() {
close(m_procMountsFd);
// Tear down udev interface
+ if(m_udevMonitorStruct) {
+ udev_monitor_unref(m_udevMonitorStruct);
+ }
udev_unref(m_udevStruct);
// Delete members