aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFawzi Mohamed <fawzi.mohamed@qt.io>2022-06-10 16:18:31 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-08-30 12:51:35 +0000
commitb851c6f0edc2b23e4c104132b5d4297e21e5a16f (patch)
tree542baaf10a2bbb201fa823c5491312c286d12cea
parent0dcab263e9df437059c08a0027021031a7fa596a (diff)
qmldom: correctly use delete to free objects created with new
Fixes: QTBUG-104084 Change-Id: I7bb3b76f68b6cf98a4bc484a31905852cf1dba09 Reviewed-by: Marc Mutz <marc.mutz@qt.io> (cherry picked from commit c017f2692cd594461b61e5043176a0f9319b91d0) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--src/qmldom/qqmldommoduleindex.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qmldom/qqmldommoduleindex.cpp b/src/qmldom/qqmldommoduleindex.cpp
index d017690e81..9d3aa4dfbb 100644
--- a/src/qmldom/qqmldommoduleindex.cpp
+++ b/src/qmldom/qqmldommoduleindex.cpp
@@ -145,7 +145,7 @@ ModuleIndex::~ModuleIndex()
auto it = scopes.begin();
auto end = scopes.end();
while (it != end) {
- free(*it);
+ delete *it;
++it;
}
}