[Libreoffice-commits] core.git: svx/source
Caolán McNamara
caolanm at redhat.com
Tue Nov 8 09:07:32 UTC 2016
svx/source/table/cell.cxx | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 19fc36293c082ba3462cd8082cfee95d99e63b3a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Nov 8 09:06:23 2016 +0000
coverity#1394268 Resource leak
Change-Id: I8f4a76d4f7e5cb2429ed5911c6026535590c681e
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 6acddfd..38a29c2 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
More information about the Libreoffice-commits
mailing list