summaryrefslogtreecommitdiff
path: root/lotuswordpro
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-18 01:35:05 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-18 01:58:45 +0100
commit856a3a09a06fef903ce09d385a97205fdf9308fe (patch)
treefb0fef9338efaa98dc88af58f6e7810eecc53944 /lotuswordpro
parent655c7b5260e2618d0115f1437f0a96b2a9490f09 (diff)
coverity: fix memory leak
Change-Id: I12ad99f3179ee8ef9e0322823685eb2bf337fc22
Diffstat (limited to 'lotuswordpro')
-rw-r--r--lotuswordpro/source/filter/lwprowlayout.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/lotuswordpro/source/filter/lwprowlayout.cxx b/lotuswordpro/source/filter/lwprowlayout.cxx
index f21114ca4c73..1c162f8c6848 100644
--- a/lotuswordpro/source/filter/lwprowlayout.cxx
+++ b/lotuswordpro/source/filter/lwprowlayout.cxx
@@ -248,25 +248,25 @@ void LwpRowLayout::ConvertRow(XFTable* pXFTable,sal_uInt8 nStartCol,sal_uInt8 nE
*/
void LwpRowLayout::RegisterCurRowStyle(XFRow* pXFRow,sal_uInt16 nRowMark)
{
- XFRowStyle* pRowStyle;
- XFRowStyle* pNewStyle = new XFRowStyle;
- double fHeight;
XFStyleManager* pXFStyleManager = LwpGlobalMgr::GetInstance()->GetXFStyleManager();
- pRowStyle = static_cast<XFRowStyle*>(pXFStyleManager->FindStyle(m_StyleName));
+ XFRowStyle* pRowStyle = static_cast<XFRowStyle*>(pXFStyleManager->FindStyle(m_StyleName));
if (!pRowStyle)
return;
- fHeight = pRowStyle->GetRowHeight();
+ double fHeight = pRowStyle->GetRowHeight();
+ XFRowStyle* pNewStyle = new XFRowStyle;
*pNewStyle = *pRowStyle;
- std::map<sal_uInt16,LwpRowLayout*>::iterator iter;
LwpTableLayout* pTableLayout = GetParentTableLayout();
if (!pTableLayout)
+ {
+ delete pNewStyle;
return;
+ }
std::map<sal_uInt16,LwpRowLayout*> RowsMap = pTableLayout->GetRowsMap();
for (sal_uInt16 i=crowid+1; i<nRowMark;i++)
{
- iter = RowsMap.find(i);
+ std::map<sal_uInt16,LwpRowLayout*>::iterator iter = RowsMap.find(i);
if (iter == RowsMap.end())
{
pRowStyle = static_cast<XFRowStyle*>(