From 8b2e2c3358a167e81495bf365b19149dfcba65f4 Mon Sep 17 00:00:00 2001 From: Georgia Garcia Date: Mon, 4 Aug 2025 18:50:54 -0300 Subject: [PATCH] parser: free leaking cod_entry in case of failure in do_alias Signed-off-by: Georgia Garcia --- parser/parser_alias.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/parser/parser_alias.c b/parser/parser_alias.c index 635f8c880..9e840599b 100644 --- a/parser/parser_alias.c +++ b/parser/parser_alias.c @@ -133,8 +133,10 @@ static void process_entries(const void *nodep, VISIT value, int level unused) if (entry->link_name && strncmp((*t)->from, entry->link_name, len) == 0) { char *n = do_alias(*t, entry->link_name); - if (!n) + if (!n) { + free_cod_entries(dup); return; + } if (!dup) dup = copy_cod_entry(entry); free(dup->link_name);