hdd_menu: fix memleak in menu setup

git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@884 e54a6e83-5905-42d5-8d5c-058d10e6a962


Origin commit data
------------------
Commit: ae953125d3
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2010-11-06 (Sat, 06 Nov 2010)
This commit is contained in:
Stefan Seyfried
2010-11-06 22:15:22 +00:00
parent 7335d9936b
commit 8828b0362d

View File

@@ -164,7 +164,11 @@ int CHDDMenuHandler::doMenu ()
tempMenu->addItem(new CMenuForwarder(LOCALE_HDD_CHECK, true, "", new CHDDChkExec, namelist[i]->d_name));
hddmenu->addItem(new CMenuForwarderNonLocalized(str, removable ? false : true, NULL, tempMenu));
hdd_found = 1;
free(namelist[i]);
}
if (n >= 0)
free(namelist);
if(!hdd_found)
hddmenu->addItem(new CMenuForwarder(LOCALE_HDD_NOT_FOUND, false));