From bc9b5c830fe4d424148f9991f416442c51e6e4fd Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 4 Mar 2022 15:40:01 +0000 Subject: cid#1500511 silence Resource leak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I37cdd52d965112598249b929fa49c759a88606c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131002 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- codemaker/source/javamaker/javatype.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'codemaker') 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) -- cgit