aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/nativestyle/items/qquickstyleitemcheckbox.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-09-25 15:55:43 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-09-29 10:01:37 +0200
commit5e4f4ed2410a29914a70b7c7d0b7b4f3a136f289 (patch)
treefe4cac8e40197a9b7eb6f688920099cde3d6fbaf /src/imports/nativestyle/items/qquickstyleitemcheckbox.cpp
parentf12e2061c460504d6db1d1370e97b5eeead9c7bf (diff)
QQuickMenu: fix heap-use-after-free
The previous patch fixed a memory leak, which in turn exposed an issue caused by item change listeners not being removed before contentModel is destroyed. QQuickMenuPrivate::itemParentChanged() then tried to access that contentModel, resulting in a heap-use-after-free. This patch fixes the issue by removing all menu items before the menu is destroyed, ensuring that the change listeners are removed in time. Pick-to: 5.15 5.12 Task-number: QTBUG-86851 Change-Id: I3dc0a251d7fd9c05c384de6472e73493b2d5b664 Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Diffstat (limited to 'src/imports/nativestyle/items/qquickstyleitemcheckbox.cpp')
0 files changed, 0 insertions, 0 deletions