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

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed May 19 09:11:52 UTC 2021


 sw/source/uibase/misc/swruler.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 419907270821c7bcbaa2b0a4925194a95705c624
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed May 19 10:07:11 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed May 19 11:10:56 2021 +0200

    fix leak in SwCommentRuler::NotifyKit
    
    Change-Id: I8da926f2d2556beed81b4d9e42f9ea57286f6f18
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115782
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx
index 1f94564df88e..b53987593c4f 100644
--- a/sw/source/uibase/misc/swruler.cxx
+++ b/sw/source/uibase/misc/swruler.cxx
@@ -284,8 +284,10 @@ void SwCommentRuler::NotifyKit()
 
     tools::JsonWriter aJsonWriter;
     CreateJsonNotification(aJsonWriter);
+    char* pJsonData = aJsonWriter.extractData();
     mpViewShell->GetSfxViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_RULER_UPDATE,
-                                                               aJsonWriter.extractData());
+                                                               pJsonData);
+    free(pJsonData);
 }
 
 void SwCommentRuler::Update()


More information about the Libreoffice-commits mailing list