aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch')
-rw-r--r--recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch b/recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch
new file mode 100644
index 00000000..050a914e
--- /dev/null
+++ b/recipes-qt/qt5/qtdeclarative/0001-Fix-QQmlExpression-leaking-QQmlError-objects.patch
@@ -0,0 +1,35 @@
+From f9dcbf008b430aadd464985b7a618eca8173d264 Mon Sep 17 00:00:00 2001
+From: Robert Griebl <robert.griebl@pelagicore.com>
+Date: Thu, 23 Feb 2017 15:11:13 +0100
+Subject: [PATCH 1/3] Fix QQmlExpression leaking QQmlError objects
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If the user doesn't clear any potential errors manually via clearError(),
+then do it automatically in the destructor. Found with valgrind.
+
+[ChangeLog][QtQml][QQmlExpression] Fixed memory leak
+
+Change-Id: If5b1181850c7463c939a7ba536d74e7054c53d60
+Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
+Signed-off-by: Gordan Markuš <gordan.markus@pelagicore.com>
+---
+ src/qml/qml/qqmlexpression.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/qml/qml/qqmlexpression.cpp b/src/qml/qml/qqmlexpression.cpp
+index 6afbd05..5cb3d4d 100644
+--- a/src/qml/qml/qqmlexpression.cpp
++++ b/src/qml/qml/qqmlexpression.cpp
+@@ -200,6 +200,7 @@ QQmlExpression::QQmlExpression(QQmlContextData *ctxt, QObject *scope,
+ */
+ QQmlExpression::~QQmlExpression()
+ {
++ clearError();
+ }
+
+ /*!
+--
+2.9.3
+