summaryrefslogtreecommitdiff
path: root/l10ntools
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-05 16:19:45 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-09-05 16:26:15 +0200
commit4a59b7519688e4f7662367e3b4bee01d91ade9cd (patch)
tree36d5f7ef795a9a0ffb0a168bcfa849841b3a3228 /l10ntools
parent713f03d8ff946ebb2bbd8455c053d4c3e57c2ece (diff)
CID#1078787: fix memory leak
Change-Id: Ia54965d35ffe29e32b85cd720ecd41495ff72063
Diffstat (limited to 'l10ntools')
-rw-r--r--l10ntools/source/pocheck.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/l10ntools/source/pocheck.cxx b/l10ntools/source/pocheck.cxx
index 10dcb19be3e8..9dcbe75e250e 100644
--- a/l10ntools/source/pocheck.cxx
+++ b/l10ntools/source/pocheck.cxx
@@ -248,23 +248,27 @@ static void checkFunctionNames(OString aLanguage)
for(;;)
{
- PoEntry* aPoEntry = new PoEntry();
- aPoInput.readEntry(*aPoEntry);
+ PoEntry* pPoEntry = new PoEntry();
+ aPoInput.readEntry(*pPoEntry);
if( aPoInput.eof() )
+ {
+ delete pPoEntry;
break;
- if( !aPoEntry->isFuzzy() && aPoEntry->getGroupId() == "RID_PRICING_FUNCTION_NAMES" )
+ }
+
+ if( !pPoEntry->isFuzzy() && pPoEntry->getGroupId() == "RID_PRICING_FUNCTION_NAMES" )
{
- OString aMsgStr = aPoEntry->getMsgStr();
+ OString aMsgStr = pPoEntry->getMsgStr();
if( aMsgStr.isEmpty() )
continue;
if( aLocalizedCoreFunctionNames.find(aMsgStr) != aLocalizedCoreFunctionNames.end() )
aMsgStr += "_ADD";
if( aLocalizedFunctionNames.find(aMsgStr) == aLocalizedFunctionNames.end() ) {
aLocalizedFunctionNames[aMsgStr] = 1;
- delete aPoEntry;
+ delete pPoEntry;
} else {
aLocalizedFunctionNames[aMsgStr]++;
- repeatedEntries.push_back(aPoEntry);
+ repeatedEntries.push_back(pPoEntry);
}
}
}