diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-31 10:57:33 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-05-31 16:19:53 +0200 |
commit | 057b25c04ea1032c20d99fc3eda88680cd0b9e54 (patch) | |
tree | 8b2e1b7f03aaf270dd4f361f34e8a010b9c039f8 /xmlscript | |
parent | 5b8729a741bd65c2f61ae9caba7ea15a139835e5 (diff) |
crashtesting fix
when doing
soffice --convert-to ods tdf96952-1.xls
after
commit 5c79032077d387053c62829d62518695f68555c1
Date: Tue May 25 09:32:58 2021 +0200
fix leaks in loading xmlscript
Change-Id: I55c1e95a09db937604f62a5b33e56349512ff8ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116435
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmlscript')
-rw-r--r-- | xmlscript/source/xmldlg_imexp/imp_share.hxx | 2 | ||||
-rw-r--r-- | xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/xmlscript/source/xmldlg_imexp/imp_share.hxx b/xmlscript/source/xmldlg_imexp/imp_share.hxx index 99a52b58dcb1..2cc574c01b93 100644 --- a/xmlscript/source/xmldlg_imexp/imp_share.hxx +++ b/xmlscript/source/xmldlg_imexp/imp_share.hxx @@ -531,6 +531,8 @@ public: class BulletinBoardElement : public ControlElement { + // we are the owner of this, so have to keep a reference to it + rtl::Reference<DialogImport> mxDialogImport; public: virtual css::uno::Reference< css::xml::input::XElement > SAL_CALL startChildElement( diff --git a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx index da2fd2d2c412..66a69a2b5518 100644 --- a/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx +++ b/xmlscript/source/xmldlg_imexp/xmldlg_impmodels.cxx @@ -1725,7 +1725,8 @@ BulletinBoardElement::BulletinBoardElement( OUString const & rLocalName, Reference< xml::input::XAttributes > const & xAttributes, ElementBase * pParent, DialogImport * pImport ) - : ControlElement( rLocalName, xAttributes, pParent, pImport ) + : ControlElement( rLocalName, xAttributes, pParent, pImport ), + mxDialogImport(pImport) { OUString aValue( _xAttributes->getValueByUidName( m_pImport->XMLNS_DIALOGS_UID, "left" ) ); if (!aValue.isEmpty()) |