sc/source/ui/undo/undotab.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2a8b6228468379a16970046b41c32e52b8609472
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri Mar 1 16:24:42 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Mon Mar 25 13:22:28 2024 +0100

    extractData passes ownership of buffer to caller
    
    libreOfficeKitViewCallback doesn't free arg, so this leaks.
    
    This trap is fixed in 24.04 onwards
    
    Change-Id: I6a1674f3e28feb3d44ae05130e68ffb77feb9066
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164225
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Tested-by: Marco Cecchetti <marco.cecche...@collabora.com>
    Reviewed-by: Marco Cecchetti <marco.cecche...@collabora.com>

diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 7b87450fe354..fa1194c9cdc0 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -116,7 +116,7 @@ void lcl_UndoCommandResult(const ScTabViewShell* pViewShell,
             lcl_MakeJsonArray(aJson, *pOldTabs, "oldTabs");
     }
 
-    pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, 
aJson.extractData());
+    pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_UNO_COMMAND_RESULT, 
aJson.extractAsOString().getStr());
 }
 }
 

Reply via email to