From af630812b8f5738d1574aae723034601ecc7307b Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sat, 9 Oct 2021 09:32:02 -0700 Subject: [PATCH] macro: Fix memory leak expanding !DO loop over list. Found by Address Sanitizer. --- src/language/lexer/macro.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/language/lexer/macro.c b/src/language/lexer/macro.c index 62d060aad2..bced649ec3 100644 --- a/src/language/lexer/macro.c +++ b/src/language/lexer/macro.c @@ -1836,6 +1836,7 @@ macro_expand_do (const struct macro_token *tokens, size_t n_tokens, macro_expand (p, do_end - p, &subme, exp); } + macro_tokens_uninit (&items); return do_end - tokens + 1; } else if (p < end && p->token.type == T_EQUALS) -- 2.30.2