diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-11 12:30:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-05-11 14:40:15 +0200 |
commit | 31d3f7c7e571acbce0b4da98e6a240ecdc8ea014 (patch) | |
tree | 77e76cddc10765fea5693a5095330a31ce350ba3 /sc | |
parent | a161d8c2c7322cda720ec487cd31baae23f16546 (diff) |
do not leak on error path
Change-Id: Iba675c7465b1850e154152d86141947c4779952b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/filter/oox/workbookhelper.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sc/source/filter/oox/workbookhelper.cxx b/sc/source/filter/oox/workbookhelper.cxx index 7adb76bcb7ef..8c7ffb3de4d8 100644 --- a/sc/source/filter/oox/workbookhelper.cxx +++ b/sc/source/filter/oox/workbookhelper.cxx @@ -370,7 +370,10 @@ ScRangeData* lcl_addNewByNameAndTokens( ScDocument& rDoc, ScRangeName* pNames, c if ( pNames->insert(pNew) ) bDone = true; if (!bDone) + { + delete pNew; throw RuntimeException(); + } return pNew; } |