summaryrefslogtreecommitdiffstats
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:08 +0100
commit1a5bc0e4ffef4e8baef9f3554ba3184fbc674211 (patch)
tree62d7a2a533e478c0c534ad7ab24c6e40b7e77f8f
parentab525f2baada44f6dd8c80970c2875a0b19b3a05 (diff)
downloadtdelibs-1a5bc0e4ffef4e8baef9f3554ba3184fbc674211.tar.gz
tdelibs-1a5bc0e4ffef4e8baef9f3554ba3184fbc674211.zip
Fix memory leak after processing udev_device
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
-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 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) {