Skip to content

Commit 5555f14

Browse files
jimmodpgeorge
authored andcommitted
py/lexer: Clear fstring_args vstr on lexer free.
This was missed in 692d36d. 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>
1 parent 44818d1 commit 5555f14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

py/lexer.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,9 @@ void mp_lexer_free(mp_lexer_t *lex) {
878878
if (lex) {
879879
lex->reader.close(lex->reader.data);
880880
vstr_clear(&lex->vstr);
881+
#if MICROPY_PY_FSTRINGS
882+
vstr_clear(&lex->fstring_args);
883+
#endif
881884
m_del(uint16_t, lex->indent_level, lex->alloc_indent_level);
882885
m_del_obj(mp_lexer_t, lex);
883886
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy