system/localize.cpp: fix destructor

Origin commit data
------------------
Branch: ni/coolstream
Commit: 58efee4835
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2012-05-03 (Thu, 03 May 2012)


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

------------------
This commit was generated by Migit
This commit is contained in:
[CST] Focus
2012-05-03 17:27:45 +04:00
parent 43b82350fd
commit 24d26dde58

View File

@@ -99,10 +99,16 @@ CLocaleManager::CLocaleManager()
CLocaleManager::~CLocaleManager()
{
for (unsigned j = 0; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
if (localeData[j] != locale_real_names[j])
if (localeData[j] != locale_real_names[j] && localeData[j] != defaultData[j])
::free(localeData[j]);
delete localeData;
delete[] localeData;
for (unsigned j = 0; j < (sizeof(locale_real_names)/sizeof(const char *)); j++)
if (defaultData[j] != locale_real_names[j])
::free(defaultData[j]);
delete[] defaultData;
}
const char * path[2] = {"/var/tuxbox/config/locale/", DATADIR "/neutrino/locale/"};