]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-120860: Fix a few bugs in `type_setattro` error paths. (GH-120861) (#120963)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 24 Jun 2024 18:33:39 +0000 (20:33 +0200)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 18:33:39 +0000 (18:33 +0000)
commit6aee5edb84cfa23f430091270a4118e51894c767
tree14d49722bc9e1d20a7a7d1462872965ced66ea4b
parent9769b7ae064a0546a98cbcbec2561dbaba20cd23
[3.13] gh-120860: Fix a few bugs in `type_setattro` error paths. (GH-120861) (#120963)

Moves the logic to update the type's dictionary to its own function in order
to make the lock scoping more clear.

Also, ensure that `name` is decref'd on the error path.
(cherry picked from commit dee63cb35971b87a09ddda5d6f29cd941f570720)

Co-authored-by: Sam Gross <colesbury@gmail.com>
Objects/typeobject.c