Commit 071371bc authored by Andres Freund's avatar Andres Freund

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
parent 0976c4dd
...@@ -531,6 +531,7 @@ llvm_compile_module(LLVMJitContext *context) ...@@ -531,6 +531,7 @@ llvm_compile_module(LLVMJitContext *context)
{ {
orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module, orc_handle = LLVMOrcAddEagerlyCompiledIR(compile_orc, context->module,
llvm_resolve_symbol, NULL); llvm_resolve_symbol, NULL);
LLVMDisposeModule(context->module);
} }
#else #else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment