mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
py/lexer: Clear fstring_args vstr on lexer free.
This was missed in 692d36d779. It's not
strictly necessary as the GC will clean it anyway, but it's good to
pre-emptively gc_free() all the blocks used in lexing/parsing.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
committed by
Damien George
parent
44818d1a35
commit
5555f147df
@@ -878,6 +878,9 @@ void mp_lexer_free(mp_lexer_t *lex) {
|
||||
if (lex) {
|
||||
lex->reader.close(lex->reader.data);
|
||||
vstr_clear(&lex->vstr);
|
||||
#if MICROPY_PY_FSTRINGS
|
||||
vstr_clear(&lex->fstring_args);
|
||||
#endif
|
||||
m_del(uint16_t, lex->indent_level, lex->alloc_indent_level);
|
||||
m_del_obj(mp_lexer_t, lex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user