From fdb569a3e29c58130924a51b333b5aff5ec64eb3 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Fri, 21 Mar 2025 13:28:41 +0100 Subject: [PATCH] QKdeTheme: Don't leak resources on shutdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The theme stores an array of pointers to allocated QFonts, which need to be freed. While this is not a "hard" leak (the OS will clean up the memory on shutdown, and QKdeTheme lives as long as the application), it creates ASAN warnings, which distract from more severe issues. Change-Id: Iaa57138e5273c300c616ba85340283f18a267b09 Reviewed-by: Piotr WierciƄski --- src/gui/platform/unix/qkdetheme.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/platform/unix/qkdetheme.cpp b/src/gui/platform/unix/qkdetheme.cpp index affcdb8c203..7cb571fc3b6 100644 --- a/src/gui/platform/unix/qkdetheme.cpp +++ b/src/gui/platform/unix/qkdetheme.cpp @@ -67,6 +67,7 @@ public: }; QKdeThemePrivate(const QStringList &kdeDirs, int kdeVersion); + ~QKdeThemePrivate() { clearResources(); } static QString kdeGlobals(const QString &kdeDir, int kdeVersion) {