From 3f5a44ac27cd6d9cbe4627f1c19f534fe13ec0e2 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Mon, 14 Sep 2020 18:55:01 +0200 Subject: [PATCH] src/gui/glcdsetup.cpp: fix memleak --- src/gui/glcdsetup.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/glcdsetup.cpp b/src/gui/glcdsetup.cpp index 30397e67f..d55550978 100644 --- a/src/gui/glcdsetup.cpp +++ b/src/gui/glcdsetup.cpp @@ -428,6 +428,7 @@ int GLCD_Menu::GLCD_Brightness_Settings() gbs->addItem(mf); int res = gbs->exec(NULL, ""); + delete dim_time; delete gbs; cGLCD::getInstance()->StandbyMode(false); return res; @@ -462,8 +463,9 @@ int GLCD_Menu::GLCD_Theme_Settings() CColorChooser* bar = new CColorChooser(LOCALE_GLCD_SELECT_BAR, &t.glcd_progressbar_color_red, &t.glcd_progressbar_color_green, &t.glcd_progressbar_color_blue, NULL, colorSetupNotifier); gts->addItem(new CMenuDForwarder(LOCALE_GLCD_SELECT_BAR, true, NULL, bar)); - //delete colorSetupNotifier; + int res = gts->exec(NULL, ""); + delete colorSetupNotifier; delete gts; cGLCD::getInstance()->StandbyMode(false); return res;