From d7cbb2cdc3436f2407365c57f31f29631441bab4 Mon Sep 17 00:00:00 2001 From: zinc Date: Wed, 14 Oct 2026 16:39:17 +0330 Subject: zc0: free the saved token when the local-embed lookahead returns early --- src/tools/zc0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/zc0.c b/src/tools/zc0.c index a3c3f4a..d484016 100644 --- a/src/tools/zc0.c +++ b/src/tools/zc0.c @@ -783,7 +783,7 @@ static void stmt(void) else if (is(".")) { next(); ptagname(); nw = 1; } /* a bare tag: .m p = new(3); */ else if (is("embed")) { /* embed "file" as [type] name; makes a local */ Lex L; lexsave(&L); next(); - if (tk == T_STR) { embeddecl(1); return; } + if (tk == T_STR) { free(L.ts); embeddecl(1); return; } /* the saved token is not restored */ lexrest(&L); } if (nw >= 0 || accept("let") || accept("var")) { -- cgit v1.2.3