From 7c8bec314a43e09fdb5a481077cf6b86f7626595 Mon Sep 17 00:00:00 2001 From: Lang Hames Date: Thu, 30 Jul 2015 02:05:37 +0000 Subject: [PATCH] [MCJIT] Fix a memory leak in a unit test that was introduced in r243589. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@243609 91177308-0d34-0410-b5e6-96231b3b80d8 --- unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp index 16530293270..30561b7d49c 100644 --- a/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp +++ b/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp @@ -505,6 +505,7 @@ TEST_F(MCJITCAPITest, addGlobalMapping) { LLVMPositionBuilderAtEnd(Builder, Entry); LLVMValueRef RetVal = LLVMBuildCall(Builder, MappedFn, NULL, 0, ""); LLVMBuildRet(Builder, RetVal); + LLVMDisposeBuilder(Builder); LLVMVerifyModule(Module, LLVMAbortProcessAction, &Error); LLVMDisposeMessage(Error); -- 2.34.1