summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-12 12:00:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-12 15:14:01 +0200
commit59935c314945cdc365878a898317bfaa366fc36e (patch)
tree3aef15d5b4f2ac3b70a8bf87441cbab7f37d8b18 /include
parent6b03d6f3b29964c6311b97af5734529285a37f3f (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 'include')
-rw-r--r--include/sfx2/app.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index b4d31614917b..a3299e9cde73 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -99,16 +99,16 @@ enum class SfxToolsModule
class SFX2_DLLPUBLIC SfxLinkItem : public SfxPoolItem
{
- Link<SfxPoolItem*, void> aLink;
+ Link<SfxPoolItem const *, void> aLink;
public:
- SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem*, void>& rValue ) : SfxPoolItem( nWhichId )
+ SfxLinkItem( sal_uInt16 nWhichId, const Link<SfxPoolItem const *, void>& rValue ) : SfxPoolItem( nWhichId )
{ aLink = rValue; }
virtual SfxPoolItem* Clone( SfxItemPool* = nullptr ) const override
{ return new SfxLinkItem( *this ); }
virtual bool operator==( const SfxPoolItem& rL) const override
{ return static_cast<const SfxLinkItem&>(rL).aLink == aLink; }
- const Link<SfxPoolItem*, void>&
+ const Link<SfxPoolItem const *, void>&
GetValue() const { return aLink; }
};