diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-12 12:00:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-12 15:14:01 +0200 |
commit | 59935c314945cdc365878a898317bfaa366fc36e (patch) | |
tree | 3aef15d5b4f2ac3b70a8bf87441cbab7f37d8b18 /sw/source | |
parent | 6b03d6f3b29964c6311b97af5734529285a37f3f (diff) |
fix leak in SfxApplication::OpenDocExec_Impl
when calling Link on SfxLinkItem, none of the callee sites free the
memory associated with the Clone()'ed SfxPoolItem, so just skip the
cloning, and make the Link take a const pointer to make this more
obvious.
Change-Id: Icd187e9d8d3ace9bf2e6ff183489999b105708e4
Reviewed-on: https://gerrit.libreoffice.org/55671
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/inc/navipi.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/inc/navipi.hxx b/sw/source/uibase/inc/navipi.hxx index 590867472bcc..6bf64aac0675 100644 --- a/sw/source/uibase/inc/navipi.hxx +++ b/sw/source/uibase/inc/navipi.hxx @@ -111,7 +111,7 @@ class SwNavigationPI : public PanelLayout, DECL_LINK( ToolBoxDropdownClickHdl, ToolBox*, void ); DECL_LINK( EditAction, NumEditAction&, void ); DECL_LINK( EditGetFocus, Control&, void ); - DECL_LINK( DoneLink, SfxPoolItem *, void ); + DECL_LINK( DoneLink, SfxPoolItem const *, void ); DECL_LINK( MenuSelectHdl, Menu *, bool ); DECL_LINK( ChangePageHdl, Timer*, void ); DECL_LINK( PageEditModifyHdl, SpinField&, void ); diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index fe6f3dddafa9..7f265fda712e 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -1014,9 +1014,9 @@ void SwNavigationPI::UpdateListBox() m_aDocListBox->SetUpdateMode(true); } -IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem, void) +IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem const *, pItem, void) { - const SfxViewFrameItem* pFrameItem = dynamic_cast<SfxViewFrameItem*>( pItem ); + const SfxViewFrameItem* pFrameItem = dynamic_cast<SfxViewFrameItem const *>( pItem ); if( pFrameItem ) { SfxViewFrame* pFrame = pFrameItem->GetFrame(); |