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
This commit is contained in:
seife
2010-11-06 22:15:22 +00:00
parent 5f835be3ed
commit ae953125d3

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));