aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-06-21 02:43:17 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-06-21 02:43:17 +0200
commitc976a61f60e32be3391c759ef86a41db4bbd62b0 (patch)
tree4855fa2debb4a6dc4706acb89d831082bbc45eb3 /src
parentb3930f14c0c9bb7e4c69664090c568900849c50a (diff)
Avoid memory leak
Diffstat (limited to 'src')
-rw-r--r--src/codegen.c1
1 files changed, 1 insertions, 0 deletions
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);