From 3025ff3203a0a94ebd0bd3ca222b298abe741514 Mon Sep 17 00:00:00 2001 From: servostar Date: Thu, 10 Oct 2024 20:44:51 +0200 Subject: [PATCH] fix: leaked memory from `strdup` called by lldcl module --- src/link/lldc/lldc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/link/lldc/lldc.c b/src/link/lldc/lldc.c index 2d6c6de..39a93ad 100644 --- a/src/link/lldc/lldc.c +++ b/src/link/lldc/lldc.c @@ -85,6 +85,9 @@ bool lldc_link(TargetConfig* target_config, TargetLinkConfig* link_config) { if (!code) { print_message(Error, message); + } + + if (message != NULL) { free((void*) message); }