LLVMJIT: Free created module in LLVM < 5.

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
pull/31/merge
Andres Freund 8 years ago
parent 0976c4ddd4
commit 071371bc43
  1. 1
      src/backend/jit/llvm/llvmjit.c

@ -531,6 +531,7 @@ llvm_compile_module(LLVMJitContext *context)
{
orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module,
llvm_resolve_symbol, NULL);
LLVMDisposeModule(context->module);
}
#else
{

Loading…
Cancel
Save