Skip to content

Commit fdf7e2e

Browse files
rialbatdiegorusso
authored andcommitted
pythongh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (python#131764)
1 parent c040962 commit fdf7e2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Parser/pegen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ initialize_token(Parser *p, Token *parser_token, struct token *new_token, int to
194194
parser_token->metadata = NULL;
195195
if (new_token->metadata != NULL) {
196196
if (_PyArena_AddPyObject(p->arena, new_token->metadata) < 0) {
197-
Py_DECREF(parser_token->metadata);
197+
Py_DECREF(new_token->metadata);
198198
return -1;
199199
}
200200
parser_token->metadata = new_token->metadata;

0 commit comments

Comments
 (0)