diff options
Diffstat (limited to 'Parser/pegen_errors.c')
-rw-r--r-- | Parser/pegen_errors.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Parser/pegen_errors.c b/Parser/pegen_errors.c index e26bad2..1f227da 100644 --- a/Parser/pegen_errors.c +++ b/Parser/pegen_errors.c @@ -165,6 +165,7 @@ _PyPegen_tokenize_full_source_to_check_for_errors(Parser *p) { int ret = 0; struct token new_token; + new_token.metadata = NULL; for (;;) { switch (_PyTokenizer_Get(p->tok, &new_token)) { @@ -192,6 +193,7 @@ _PyPegen_tokenize_full_source_to_check_for_errors(Parser *p) { exit: + Py_XDECREF(new_token.metadata); // If we're in an f-string, we want the syntax error in the expression part // to propagate, so that tokenizer errors (like expecting '}') that happen afterwards // do not swallow it. |