diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2017-11-18 22:43:41 +0900 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-19 07:56:37 +0100 |
commit | 28e1f3c77fe19091cddf527f7758386dddcdad34 (patch) | |
tree | 5bed1e92de8b2ace3e70a3db4bac086409dff99d /include | |
parent | 67bd9382aa17594cb7a6d1fad304ed9f275941b1 (diff) |
svl: Fix possible memleak at deleting DdeService
Change-Id: Ie10d4199999c4331af29dee2a8d98132488caa6e
Reviewed-on: https://gerrit.libreoffice.org/44909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svl/svdde.hxx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/svl/svdde.hxx b/include/svl/svdde.hxx index 003a14f83923..2f07eb768117 100644 --- a/include/svl/svdde.hxx +++ b/include/svl/svdde.hxx @@ -48,7 +48,7 @@ struct Conversation; typedef ::std::vector< DdeService* > DdeServices; typedef ::std::vector< long > DdeFormats; -typedef ::std::vector< Conversation* > ConvList; +typedef std::vector<std::unique_ptr<Conversation>> ConvList; class SVL_DLLPUBLIC DdeData @@ -297,7 +297,7 @@ private: DdeFormats aFormats; DdeTopic* pSysTopic; DdeString* pName; - ConvList* pConv; + ConvList m_vConv; short nStatus; SVL_DLLPRIVATE bool HasCbFormat( sal_uInt16 ); @@ -306,6 +306,9 @@ public: DdeService( SAL_UNUSED_PARAMETER const OUString& ); virtual ~DdeService(); + DdeService( const DdeService& ) = delete; + DdeService& operator= ( const DdeService& ) = delete; + const OUString GetName() const; short GetError() { return nStatus; } |