diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-09 16:01:50 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2013-03-09 17:59:12 +0100 |
commit | 0973922dbfb58d3794c8645fab215ddcf9e24fc2 (patch) | |
tree | f4a7c977e2169966fba804f7408fa3ca7a40a931 /sc/source | |
parent | ccc349d3abb70ef38cd2b7706da51b060a385908 (diff) |
coverity#705689: fix memory leak
Change-Id: Icdedeb1cfa50c11a640b08b930723bcbe018ebc2
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/drawfunc/mediash.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sc/source/ui/drawfunc/mediash.cxx b/sc/source/ui/drawfunc/mediash.cxx index 17392b1d5c5d..2a4b9d744165 100644 --- a/sc/source/ui/drawfunc/mediash.cxx +++ b/sc/source/ui/drawfunc/mediash.cxx @@ -110,7 +110,7 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq ) if( pItem ) { - SdrMarkList* pMarkList = new SdrMarkList( pView->GetMarkedObjectList() ); + boost::scoped_ptr<SdrMarkList> pMarkList(new SdrMarkList( pView->GetMarkedObjectList() )); if( 1 == pMarkList->GetMarkCount() ) { @@ -121,8 +121,6 @@ void ScMediaShell::ExecuteMedia( SfxRequest& rReq ) static_cast< sdr::contact::ViewContactOfSdrMediaObj& >( pObj->GetViewContact() ).executeMediaItem( static_cast< const ::avmedia::MediaItem& >( *pItem ) ); } - - delete pMarkList; } } } |