diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-10-28 16:03:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-10-29 11:01:33 +0100 |
commit | 9b3b14bb8f5dc6df835c30e060b6932dfd91cce5 (patch) | |
tree | 817203e41c63281a1beb1f7e6c4be25193f0ef61 /sc | |
parent | 540cd706db44858247cf69f1f40808f02bd78587 (diff) |
memleak with null pLocalNames
Change-Id: I6904841292bf66ff24e00b8ee90f3ecc99c1f1da
Reviewed-on: https://gerrit.libreoffice.org/44008
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/excel/xiname.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index b024dba479ea..eb4c537398fe 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -253,6 +253,11 @@ void XclImpName::InsertName(const ScTokenArray* pArray) if (!pLocalNames->insert(pData)) pData = nullptr; } + else + { + delete pData; + pData = nullptr; + } if (GetBiff() == EXC_BIFF8 && pData) { |