From 8828b0362d349e7120ddf6cee3374b66b06115ee Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Nov 2010 22:15:22 +0000 Subject: [PATCH] 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: https://github.com/neutrino-images/ni-neutrino/commit/ae953125d3c17334d80b734dd944c13911a5fb2b Author: Stefan Seyfried Date: 2010-11-06 (Sat, 06 Nov 2010) --- src/gui/hdd_menu.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/hdd_menu.cpp b/src/gui/hdd_menu.cpp index 05264b124..12dee8718 100644 --- a/src/gui/hdd_menu.cpp +++ b/src/gui/hdd_menu.cpp @@ -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));