[Libreoffice-commits] core.git: sc/source

Caolán McNamara caolanm at redhat.com
Sun Oct 29 10:01:57 UTC 2017


 sc/source/filter/excel/xiname.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 9b3b14bb8f5dc6df835c30e060b6932dfd91cce5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Oct 28 16:03:53 2017 +0100

    memleak with null pLocalNames
    
    Change-Id: I6904841292bf66ff24e00b8ee90f3ecc99c1f1da
    Reviewed-on: https://gerrit.libreoffice.org/44008
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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)
         {


More information about the Libreoffice-commits mailing list