[PATCH 2/4] Profile: fix potential mem leak in pointsInserted()
Lubomir I. Ivanov
neolit123 at gmail.com
Thu Mar 12 17:32:49 PDT 2015
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
The point graphics are allocated but doens't seem to be
deleted anywhere. We attempt to fix that in clearHandlers().
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
qt-ui/profile/profilewidget2.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 398934c..90ecb94 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -1053,6 +1053,7 @@ void ProfileWidget2::clearHandlers()
if (handles.count()) {
foreach (DiveHandler *handle, handles) {
scene()->removeItem(handle);
+ delete handle;
}
handles.clear();
}
--
1.7.11.msysgit.0
More information about the subsurface
mailing list