From bd7d5a8f92640ceadaa70b22e650a5644f1b030f Mon Sep 17 00:00:00 2001 From: Gleb Mazovetskiy Date: Sat, 23 Jan 2021 04:08:39 +0000 Subject: [PATCH] Fix memory leak in FontLoader::loadFontFromXml Tried building with -DCMAKE_CXX_FLAGS='-fsanitize=address -fsanitize-recover=address' and this was one of the reported leaks. --- components/fontloader/fontloader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/components/fontloader/fontloader.cpp b/components/fontloader/fontloader.cpp index 605d55243..09bf0b190 100644 --- a/components/fontloader/fontloader.cpp +++ b/components/fontloader/fontloader.cpp @@ -630,6 +630,7 @@ namespace Gui } MyGUI::ResourceManager::getInstance().loadFromXmlNode(copy, _file, _version); + delete copy; } }