Skip to content

Commit 2c686a9

Browse files
authored
gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (#131764)
1 parent 67fbfb4 commit 2c686a9

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)