diff --git a/src/compiler/llvm_codegen.c b/src/compiler/llvm_codegen.c index 1ef698c0c..a817916c8 100644 --- a/src/compiler/llvm_codegen.c +++ b/src/compiler/llvm_codegen.c @@ -680,6 +680,10 @@ static void llvm_emit_file(GenContext *c, const char *filename, LLVMCodeGenFileT { goto ERR; } + if (clone_module) + { + LLVMDisposeModule(module); + } file = fopen(filename, "wb"); if (!file) {