mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
[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 2c686a9ac2
)
Co-authored-by: rialbat <47256826+rialbat@users.noreply.github.com>
This commit is contained in:
parent
9d3f538471
commit
b0f3876054
1 changed files with 1 additions and 1 deletions
|
@ -191,7 +191,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue