From 5f0bd47f81469407023bc9b05b13cdf1834d50b3 Mon Sep 17 00:00:00 2001 From: Jarkko Koivikko Date: Sun, 7 Jan 2018 16:52:29 +0200 Subject: Dialogs: Fix minor memory leak in QQuickAbstractDialog If Dialogs decoration component is not an Item based object, there is a minor memory leak in error cleanup path, causing the object to leak. Change-Id: I79295378303e460ad0024d5994fed28ddd37b591 Reviewed-by: Mitch Curtis Reviewed-by: Shawn Rutledge Reviewed-by: Jarkko Koivikko --- src/dialogs/qquickabstractdialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dialogs/qquickabstractdialog.cpp b/src/dialogs/qquickabstractdialog.cpp index ce87d56c..e00c17a1 100644 --- a/src/dialogs/qquickabstractdialog.cpp +++ b/src/dialogs/qquickabstractdialog.cpp @@ -230,7 +230,7 @@ void QQuickAbstractDialog::decorationLoaded() } else { qWarning() << m_decorationComponent->url() << "cannot be used as a window decoration because it's not an Item"; - delete m_windowDecoration; + delete decoration; delete m_decorationComponent; m_decorationComponent = 0; } -- cgit v1.2.1