diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-10 14:14:49 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-10 15:14:48 +0200 |
commit | 0afb2b63b38dff138e66f4ac8afed60911cb6aad (patch) | |
tree | 6f0d5e837600a460a57fce6383bc4eef10cdfc7a /basic/source/sbx/sbxvalue.cxx | |
parent | b3541dea4889b9d0039554f87bd16e55189cf8b1 (diff) |
fix some leaks in basic
Change-Id: I52c10cdbe9661974c908ee052336c779a40de402
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115323
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/sbx/sbxvalue.cxx')
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 403a7f842554..e67044def3f3 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -1383,11 +1383,14 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 ) aData.pObj = nullptr; break; case 1: - aData.pObj = SbxBase::Load( r ); + { + auto ref = SbxBase::Load( r ); + aData.pObj = ref.get(); // if necessary increment Ref-Count if (aData.pObj) aData.pObj->AddFirstRef(); return ( aData.pObj != nullptr ); + } case 2: aData.pObj = this; break; |