summaryrefslogtreecommitdiff
path: root/svtools/source/graphic/grfmgr2.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 03:24:19 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-03-02 06:51:57 +0100
commita935faad11d5306631ac746ea5febaf06822bc66 (patch)
tree143ce97f85137d3059031c62bf550691378dfbdc /svtools/source/graphic/grfmgr2.cxx
parentaed9755db3de7b53cdf227c7cbcb782568649fac (diff)
coverity#736572: possible memory leak and memory corruption + docu
Change-Id: I2f1aad214481903866cd496542d961245fae47d1
Diffstat (limited to 'svtools/source/graphic/grfmgr2.cxx')
-rw-r--r--svtools/source/graphic/grfmgr2.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index fd8679e8a8c4..329e34d88848 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -1311,15 +1311,17 @@ sal_Bool GraphicManager::ImplCreateOutput( OutputDevice* pOut,
}
if ( pModAct )
{
- rOutMtf.ReplaceAction( pModAct, nCurPos );
- pAct->Delete();
+ MetaAction* pDeleteAction = rOutMtf.ReplaceAction( pModAct, nCurPos );
+ assert(pDeleteAction);
+ pDeleteAction->Delete();
}
else
{
if( pAct->GetRefCount() > 1 )
{
- rOutMtf.ReplaceAction( pModAct = pAct->Clone(), nCurPos );
- pAct->Delete();
+ MetaAction* pDeleteAction = rOutMtf.ReplaceAction( pModAct = pAct->Clone(), nCurPos );
+ assert(pDeleteAction);
+ pDeleteAction->Delete();
}
else
pModAct = pAct;