From c976a61f60e32be3391c759ef86a41db4bbd62b0 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Fri, 21 Jun 2024 02:43:17 +0200 Subject: Avoid memory leak --- src/codegen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/codegen.c b/src/codegen.c index 3088cc1..f835f5c 100644 --- a/src/codegen.c +++ b/src/codegen.c @@ -49,6 +49,7 @@ codegen(const char *file, struct type *types, struct ast ast, if (LLVMVerifyModule(ctx.mod, LLVMReturnStatusAction, &error) == 1) err("codegen: %s", error); + LLVMDisposeMessage(error); LLVMDumpModule(ctx.mod); LLVMDisposeModule(ctx.mod); LLVMContextDispose(ctx.ctx); -- cgit v1.2.3