codemaker/source/javamaker/javatype.cxx |    3 +--
 oox/source/drawingml/shape.cxx          |    2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit bc9b5c830fe4d424148f9991f416442c51e6e4fd
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 4 15:40:01 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 4 22:37:55 2022 +0100

    cid#1500511 silence Resource leak
    
    Change-Id: I37cdd52d965112598249b929fa49c759a88606c9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131002
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/codemaker/source/javamaker/javatype.cxx 
b/codemaker/source/javamaker/javatype.cxx
index 2bd624299a30..99a07339f821 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -779,8 +779,7 @@ void handleEnumType(
             std::unique_ptr< ClassFile::Code > blockCode(cf->newCode());
             blockCode->instrGetstatic(className, pair.second, classDescriptor);
             blockCode->instrAreturn();
-            blocks.emplace_back(pair.first, blockCode.get());
-            blockCode.release();
+            blocks.emplace_back(pair.first, blockCode.release());
         }
         code->instrLookupswitch(defCode.get(), blocks);
         for (const std::pair< sal_Int32, ClassFile::Code * >& pair : blocks)
commit f3226c540d45deefb08b30170fc8b2511742711c
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Mar 4 15:31:03 2022 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Mar 4 22:37:41 2022 +0100

    cid#1500524 Dereference after null check
    
    Change-Id: Ic76f1b4992f51bdfe10406734ce00135607db357
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131001
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index d0ab82501c71..98401179d84d 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1728,7 +1728,7 @@ Reference< XShape > const & Shape::createAndInsert(
         }
 
         // in some cases, we don't have any text body.
-        if( getTextBody() && ( !bDoNotInsertEmptyTextBody || 
!mpTextBody->isEmpty() ) )
+        if( mpTextBody && ( !bDoNotInsertEmptyTextBody || 
!mpTextBody->isEmpty() ) )
         {
             Reference < XText > xText( mxShape, UNO_QUERY );
             if ( xText.is() )   // not every shape is supporting an XText 
interface (e.g. GroupShape)

Reply via email to