8000 [3.12] gh-131762: Fixed dereferencing the pointer 'parser_token->meta… · python/cpython@66042e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit 66042e1

Browse files
[3.12] gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (GH-131764) (#131775)
gh-131762: Fixed dereferencing the pointer 'parser_token->metadata' with a NULL value (GH-131764) (cherry picked from commit 2c686a9) Co-authored-by: rialbat <47256826+rialbat@users.noreply.github.com>
1 parent 1826347 commit 66042e1

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
@@ -244,7 +244,7 @@ initialize_token(Parser *p, Token *parser_token, struct token *new_token, int to
244244
parser_token->metadata = NULL;
245245
if (new_token->metadata != NULL) {
246246
if (_PyArena_AddPyObject(p->arena, new_token->metadata) < 0) {
247-
Py_DECREF(parser_token->metadata);
247+
Py_DECREF(new_token->metadata);
248248
return -1;
249249
}
250250
parser_token->metadata = new_token->metadata;

0 commit comments

Comments
 (0)
0