https://github.com/python/cpython/commit/2c686a9ac243800b630d4a09622c8eb789f5b354
commit: 2c686a9ac243800b630d4a09622c8eb789f5b354
branch: main
author: rialbat <47256826+rial...@users.noreply.github.com>
committer: pablogsal <pablog...@gmail.com>
date: 2025-03-26T18:44:56Z
summary:

gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL 
value (#131764)

files:
M Parser/pegen.c

diff --git a/Parser/pegen.c b/Parser/pegen.c
index 87a9ba02274d9f..592269ead31e39 100644
--- a/Parser/pegen.c
+++ b/Parser/pegen.c
@@ -194,7 +194,7 @@ initialize_token(Parser *p, Token *parser_token, struct 
token *new_token, int to
     parser_token->metadata = NULL;
     if (new_token->metadata != NULL) {
         if (_PyArena_AddPyObject(p->arena, new_token->metadata) < 0) {
-            Py_DECREF(parser_token->metadata);
+            Py_DECREF(new_token->metadata);
             return -1;
         }
         parser_token->metadata = new_token->metadata;

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to