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

Jim Raykowski (via logerrit) logerrit at kemper.freedesktop.org
Wed Aug 12 13:38:24 UTC 2020


 cui/source/customize/cfgutil.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit ebdc0f1aada999e8b3bc8a32849a62b38819fead
Author:     Jim Raykowski <raykowj at gmail.com>
AuthorDate: Tue Aug 11 10:33:52 2020 -0800
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Aug 12 15:37:43 2020 +0200

    fix memory leaks in CuiConfigGroupListBox
    
    Change-Id: I47dab54764de24bccc42513373b65657c241a8e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100570
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 1d863889610c..13203e0926a9 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -435,7 +435,17 @@ void CuiConfigGroupListBox::ClearAll()
     for ( sal_uInt16 i=0; i<nCount; ++i )
     {
         SfxGroupInfo_Impl *pData = aArr[i].get();
-        if (pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER)
+        if (pData->nKind == SfxCfgKind::GROUP_STYLES && pData->pObject)
+        {
+            SfxStyleInfo_Impl* pStyle = static_cast<SfxStyleInfo_Impl*>(pData->pObject);
+            delete pStyle;
+        }
+        else if (pData->nKind == SfxCfgKind::FUNCTION_SCRIPT && pData->pObject )
+        {
+            OUString* pScriptURI = static_cast<OUString*>(pData->pObject);
+            delete pScriptURI;
+        }
+        else if (pData->nKind == SfxCfgKind::GROUP_SCRIPTCONTAINER)
         {
             XInterface* xi = static_cast<XInterface *>(pData->pObject);
             if (xi != nullptr)


More information about the Libreoffice-commits mailing list