From 2b92178287efe3b53237e9d61c69a4bf350c716d Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Mon, 17 Mar 2025 01:39:17 +0300 Subject: fixed leaking partially built string arguments in case of errors * E.g. `@I/foo^EQ%/` whould fail if register `%` is missing. In batch mode, this would currently escalate and terminate the program. Only in this case, memory has been "leaked". This is not critical but was causing false positives in Valgrind. * Also, cleaning up properly might come in handy once we add error-catching constructs to the language. --- src/parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/parser.c b/src/parser.c index 295c635..f4f7595 100644 --- a/src/parser.c +++ b/src/parser.c @@ -374,6 +374,7 @@ void teco_machine_main_clear(teco_machine_main_t *ctx) { teco_goto_table_clear(&ctx->goto_table); + teco_string_clear(&ctx->expectstring.string); teco_machine_stringbuilding_clear(&ctx->expectstring.machine); } -- cgit v1.2.3