Skip to content

Commit b0f3876

Browse files
[3.13] gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (GH-131764) (#131774)
gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (GH-131764) (cherry picked from commit 2c686a9) Co-authored-by: rialbat <[email protected]>
1 parent 9d3f538 commit b0f3876

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
@@ -191,7 +191,7 @@ initialize_token(Parser *p, Token *parser_token, struct token *new_token, int to
191191
parser_token->metadata = NULL;
192192
if (new_token->metadata != NULL) {
193193
if (_PyArena_AddPyObject(p->arena, new_token->metadata) < 0) {
194-
Py_DECREF(parser_token->metadata);
194+
Py_DECREF(new_token->metadata);
195195
return -1;
196196
}
197197
parser_token->metadata = new_token->metadata;

0 commit comments

Comments
 (0)