summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-28 07:57:57 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2013-02-28 10:53:11 +0100
commit32fcb0c4f56deb8813340d88d0638e1960851a06 (patch)
tree3f9649298688eddd191151666d368b8ab2004cf1 /cui
parentc0f85e6879e527ff0673c82e84e8ee0afcc6a5ec (diff)
coverity#705636: fix memory leak
Change-Id: Iabb4922aedd6f2897e005797e6d2ae1fea11ac4a
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hltpbase.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index 1d040b48c039..89e37b5215a3 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -30,6 +30,7 @@
#include "macroass.hxx"
#include <svx/svxdlg.hxx>
#include <cuires.hrc>
+#include <boost/scoped_ptr.hpp>
using namespace ::ucbhelper;
@@ -49,11 +50,11 @@ SvxFramesComboBox::SvxFramesComboBox ( Window* pParent, const ResId& rResId,
SfxDispatcher* pDispatch )
: ComboBox (pParent, rResId)
{
- TargetList* pList = new TargetList;
SfxViewFrame* pViewFrame = pDispatch ? pDispatch->GetFrame() : 0;
SfxFrame* pFrame = pViewFrame ? &pViewFrame->GetTopFrame() : 0;
if ( pFrame )
{
+ boost::scoped_ptr<TargetList> pList(new TargetList);
pFrame->GetTargetList(*pList);
if( !pList->empty() )
{