diff options
author | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-03-17 01:39:17 +0300 |
---|---|---|
committer | Robin Haberkorn <robin.haberkorn@googlemail.com> | 2025-03-17 17:39:30 +0300 |
commit | 2b92178287efe3b53237e9d61c69a4bf350c716d (patch) | |
tree | a615ca0a7451706dc6916183e98b365ed2ced43a /src/parser.c | |
parent | cddc9bf83eb5cd2c69626b31ae7373342523b626 (diff) | |
download | sciteco-2b92178287efe3b53237e9d61c69a4bf350c716d.tar.gz |
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.
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 1 |
1 files changed, 1 insertions, 0 deletions
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); } |