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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed May 19 18:47:59 UTC 2021


 sw/source/core/doc/docdesc.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 790135003b03b38a14efb7e0d345188607020a99
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed May 19 20:03:07 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed May 19 20:47:22 2021 +0200

    fix leak when removing PageDesc
    
    m_PageDescs owns the SwPageDesc entries, so when we remove from it, we
    need to delete that entry
    
    Change-Id: Ib6dbba227ec64c2d6cfc310b93e1d11397648847
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115824
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index fb7211dbae3b..b417ab0add9a 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -753,6 +753,7 @@ void SwDoc::DelPageDesc( size_t i, bool bBroadcast )
     PreDelPageDesc(&rDel); // #i7983#
 
     m_PageDescs.erase(m_PageDescs.begin() + i);
+    delete &rDel;
     getIDocumentState().SetModified();
 }
 


More information about the Libreoffice-commits mailing list