lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx |    8 ++++----
 lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 1284937bf2bd112197a99e844a5a1a961e2cf4fc
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Jan 20 09:23:01 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jan 20 11:59:39 2022 +0100

    ofz#43689 Direct-Leak
    
    Change-Id: I09823f30817163b0467b6b96f56956987337b991
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128646
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx 
b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
index 47362c809892..916531a8d624 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.cxx
@@ -234,7 +234,7 @@ void LwpSdwGroupLoaderV0102::BeginDrawObjects(std::vector< 
rtl::Reference<XFFram
  *      the corresponding drawing objects.
  * @param   pDrawObjVector   a container which will contains the created 
drawing object of XF-Model.
  */
-XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
+rtl::Reference<XFDrawGroup> LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
 {
     //flag
     unsigned char BinSignature[2];
@@ -263,7 +263,7 @@ XFDrawGroup* LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
     // fileSize
     m_pStream->SeekRel(2);
 
-    XFDrawGroup* pXFDrawGroup = new XFDrawGroup();
+    rtl::Reference<XFDrawGroup> xXFDrawGroup(new XFDrawGroup());
 
     if (nRecCount > m_pStream->remainingSize())
     {
@@ -284,12 +284,12 @@ XFDrawGroup* 
LwpSdwGroupLoaderV0102::CreateDrawGroupObject()
             }
             else
             {
-                pXFDrawGroup->Add(xXFDrawObj.get());
+                xXFDrawGroup->Add(xXFDrawObj.get());
             }
         }
     }
 
-    return pXFDrawGroup;
+    return xXFDrawGroup;
 }
 
 /**
diff --git a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx 
b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx
index b0e5b21072bb..d9d63e8424b3 100644
--- a/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx
+++ b/lotuswordpro/source/filter/lwpsdwgrouploaderv0102.hxx
@@ -83,7 +83,7 @@ public:
 
 public:
     void BeginDrawObjects(std::vector<rtl::Reference<XFFrame>>* 
pDrawObjVector);
-    XFDrawGroup* CreateDrawGroupObject();
+    rtl::Reference<XFDrawGroup> CreateDrawGroupObject();
     rtl::Reference<XFFrame> CreateDrawObject();
 };
 

Reply via email to