sfx2/source/doc/objserv.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 89b0193639f6cc1e62d9f4894ea088f9691f3a79
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri May 23 09:18:39 2025 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sat May 24 14:48:17 2025 +0200

    cid#1647994 Resource leak
    
    Change-Id: Id0fbfa4caae3ab2ef0535f1ecf38b33a1b015c62
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185707
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index d5a9bbed0a32..9ce43e1b6f02 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -813,10 +813,9 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 
             if (redactImage && redactImage->GetValue())
             {
-                RedactionTarget* redactiontarget
-                    = new RedactionTarget({ "Images", 
RedactionTargetType::REDACTION_TARGET_IMAGE,
+                RedactionTarget redactiontarget({ "Images", 
RedactionTargetType::REDACTION_TARGET_IMAGE,
                                             "All Images", false, false, 0 });
-                aRedactionTargets.push_back({*redactiontarget, 
redactiontarget->sName});
+                aRedactionTargets.push_back({redactiontarget, 
redactiontarget.sName});
             }
             else if (nResult != RET_OK || !aDlg.hasTargets() || 
!aDlg.isValidState())
             {

Reply via email to