summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-03-04 15:40:01 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-03-04 22:37:55 +0100
commitbc9b5c830fe4d424148f9991f416442c51e6e4fd (patch)
treed5b9526378c6bc17259252d400bc5daece44c492 /codemaker
parentf3226c540d45deefb08b30170fc8b2511742711c (diff)
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 <caolanm@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/javamaker/javatype.cxx3
1 files changed, 1 insertions, 2 deletions
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)