diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-16 00:20:56 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-02-16 01:00:59 +0100 |
commit | ad02b999d946469325b16232709dde96a3e9ebc8 (patch) | |
tree | b19b2cbb43b0123810c9688ef6415a1b25c0d9aa /sc/source | |
parent | b75386908483351ebd45b2b74caf2667ec7c6d08 (diff) |
coverity: fix memory leak
Change-Id: I3aed29393376933fe6f07e38fb936911723ed2fe
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/unoobj/cellsuno.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index cbd100f308f3..bcab454b54ca 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -4128,9 +4128,9 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea for (; itr != itrEnd && *itr < nTabCount; ++itr) if ( *itr != nTab && bUndo) pUndoDoc->AddUndoTab( *itr, *itr ); - ScMarkData* pUndoMark = NULL; + boost::scoped_ptr<ScMarkData> pUndoMark; if (bUndo) - pUndoMark = new ScMarkData(aMark); + pUndoMark.reset(new ScMarkData(aMark)); bool bFound = false; if (bUndo) @@ -4153,7 +4153,6 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea else { delete pUndoDoc; - delete pUndoMark; // nReplaced bleibt 0 } } |