Skip to content

Commit

Permalink
LLVMJIT: Free created module in LLVM < 5.
Browse files Browse the repository at this point in the history
Due to the differing APIs between versions, I forgot to deallocate the
generated module in older LLVM versions, leading to a memory leak.

Author: Andres Freund
  • Loading branch information
anarazel committed Mar 26, 2018
1 parent 0976c4d commit 071371b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/backend/jit/llvm/llvmjit.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ llvm_compile_module(LLVMJitContext *context)
{
orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module,
llvm_resolve_symbol, NULL);
LLVMDisposeModule(context->module);
}
#else
{
Expand Down

0 comments on commit 071371b

Please sign in to comment.