diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-12-05 10:52:57 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-06 11:48:55 +0000 |
commit | e0a3c6276a257aeb1cb3ef6d16a4dddcc65d8195 (patch) | |
tree | 0b849d9cc9b3913c596b464a24c725c26fc95bb2 /src | |
parent | 53156ddf3811f27b265213596312ba11a725e062 (diff) |
Don't read members of the binding after it has been freed
Fixes a use after free valgrind error (and thus a potential
crash) in tst_qqmljavascript::selfDeletingBinding that got
introduced with change e7f28bd13b18cfcb36ef41804029b9b296117002
Change-Id: Ia6b69af199c0f2af1cc0d33d4f13a8593b2c6d51
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlbinding.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qml/qml/qqmlbinding.cpp b/src/qml/qml/qqmlbinding.cpp index 203bfec838..e7e0cfc42e 100644 --- a/src/qml/qml/qqmlbinding.cpp +++ b/src/qml/qml/qqmlbinding.cpp @@ -250,10 +250,9 @@ protected: clearError(); } + cancelPermanentGuards(); } - cancelPermanentGuards(); - ep->dereferenceScarceResources(); } |