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:
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue