summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2017-10-23 18:46:03 +0200
committerJesus Fernandez <Jesus.Fernandez@qt.io>2017-10-23 18:36:39 +0000
commit51617b499c4f10e4079d5b58693d533dab6e1f8f (patch)
tree83bf205be0d5350dbb686e4964e18f7829c43735 /src/shared
parenta64642e1f4764d650ad6b41006c4f9e894e18d76 (diff)
Fix use after free
This could cause an immediate crash or incorrect values might be read subsequently resulting in incorrect computations. In QtFlagPropertyManager::uninitializeProperty(QtProperty *): A pointer to freed memory is dereferenced, used as a function argument, or otherwise used (CWE-416) Coverity-Id: 22622 Change-Id: I24fc9d6f7c1c516ddcadaaba2ba7cdaed7c7f806 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/qtpropertybrowser/qtpropertymanager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/qtpropertybrowser/qtpropertymanager.cpp b/src/shared/qtpropertybrowser/qtpropertymanager.cpp
index 1ca0149eb..6382f4a69 100644
--- a/src/shared/qtpropertybrowser/qtpropertymanager.cpp
+++ b/src/shared/qtpropertybrowser/qtpropertymanager.cpp
@@ -5177,8 +5177,8 @@ void QtFlagPropertyManager::uninitializeProperty(QtProperty *property)
if (it != d_ptr->m_propertyToFlags.end()) {
for (QtProperty *prop : qAsConst(it.value())) {
if (prop) {
- delete prop;
d_ptr->m_flagToProperty.remove(prop);
+ delete prop;
}
}
}