diff options
author | Jesus Fernandez <jesus.fernandez@qt.io> | 2017-10-25 11:16:04 +0200 |
---|---|---|
committer | Jesus Fernandez <Jesus.Fernandez@qt.io> | 2017-10-25 18:12:17 +0000 |
commit | d9018a43adc44e48a123c3da686f413b75feecfd (patch) | |
tree | 84dde40dfe07a7f5fe959e4d4bf73db18c3c4221 /src/shared | |
parent | 4935cbbdfb9dcefc36d1364c931270f98e8fb8bb (diff) |
Revert "Fix use after free"
This reverts 112540645d78000ad8dfed1bca6662a10522aaf1. The deleted
pointer is not dereferenced. The pointer value is used as the key in
the map. QMap::remove uses the parameter as a number.
Change-Id: I668d22a0ba21a2f6696b4dfefc617f363d7760d1
Reviewed-by: Liang Qi <liang.qi@qt.io>
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/qtpropertybrowser/qtvariantproperty.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/qtpropertybrowser/qtvariantproperty.cpp b/src/shared/qtpropertybrowser/qtvariantproperty.cpp index 8861e988c..51a2f2cf9 100644 --- a/src/shared/qtpropertybrowser/qtvariantproperty.cpp +++ b/src/shared/qtpropertybrowser/qtvariantproperty.cpp @@ -414,10 +414,10 @@ void QtVariantPropertyManagerPrivate::removeSubProperty(QtVariantProperty *prope QtProperty *internChild = wrappedProperty(property); bool wasDestroyingSubProperties = m_destroyingSubProperties; m_destroyingSubProperties = true; + delete property; m_destroyingSubProperties = wasDestroyingSubProperties; m_internalToProperty.remove(internChild); propertyToWrappedProperty()->remove(property); - delete property; } void QtVariantPropertyManagerPrivate::slotPropertyInserted(QtProperty *property, |