several memleak fixes; Dziekuje.

Origin commit data
------------------
Branch: ni/coolstream
Commit: 0f9cb1dc50
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-09-28 (Thu, 28 Sep 2017)

Origin message was:
------------------
- several memleak fixes; Dziekuje.

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-09-28 15:23:38 +02:00
parent dcb2262e2f
commit 1e1394fb56
4 changed files with 22 additions and 7 deletions

View File

@@ -728,12 +728,14 @@ _show_menu:
}
//NI
int fake_hddpower = 0;
CTouchFileNotifier * hddpowerNotifier = NULL;
hddmenu->addItem(new CMenuSeparator());
if (cs_get_revision() < 8) {
//NI HDD power (HD1/BSE only)
const char *flag_hddpower = FLAGDIR "/.hddpower";
int fake_hddpower = file_exists(flag_hddpower);
CTouchFileNotifier * hddpowerNotifier = new CTouchFileNotifier(flag_hddpower);
fake_hddpower = file_exists(flag_hddpower);
hddpowerNotifier = new CTouchFileNotifier(flag_hddpower);
mc = new CMenuOptionChooser(LOCALE_HDD_POWER, &fake_hddpower, OPTIONS_OFF0_ON1_OPTIONS, OPTIONS_OFF0_ON1_OPTION_COUNT, true, hddpowerNotifier, CRCInput::RC_yellow);
mc->setHint(NEUTRINO_ICON_HINT_IMAGELOGO, LOCALE_MENU_HINT_HDD_POWER);
hddmenu->addItem(mc);
@@ -797,7 +799,8 @@ _show_menu:
}
int ret = hddmenu->exec(NULL, "");
if (hddpowerNotifier)
delete hddpowerNotifier;
delete hddmenu;
hdd_list.clear();
devtitle.clear();