summaryrefslogtreecommitdiff
path: root/svx/source/table/cell.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-11-08 09:06:23 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-11-08 09:06:57 +0000
commit19fc36293c082ba3462cd8082cfee95d99e63b3a (patch)
treee4ca44a8e457b77230434422271c81410c573526 /svx/source/table/cell.cxx
parentf606a6b248956094a14c15d8154af5f8522e415b (diff)
coverity#1394268 Resource leak
Change-Id: I8f4a76d4f7e5cb2429ed5911c6026535590c681e
Diffstat (limited to 'svx/source/table/cell.cxx')
-rw-r--r--svx/source/table/cell.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 6acddfde05ff..38a29c2091d8 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -238,7 +238,7 @@ namespace sdr
{
OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject();
- bool bOwnParaObj = pParaObj != nullptr;
+ const bool bOwnParaObj = pParaObj != nullptr;
if( pParaObj == nullptr )
pParaObj = mxCell->GetOutlinerParaObject();
@@ -319,13 +319,19 @@ namespace sdr
// Set a cell vertical property
OutlinerParaObject* pParaObj = mxCell->GetEditOutlinerParaObject();
+
+ const bool bOwnParaObj = pParaObj != nullptr;
+
if( pParaObj == nullptr )
pParaObj = mxCell->GetOutlinerParaObject();
+
if(pParaObj)
{
pParaObj->SetVertical(bVertical);
- }
+ if( bOwnParaObj )
+ delete pParaObj;
+ }
}
// call parent