]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-120860: Fix a few bugs in `type_setattro` error paths. (#120861)
authorSam Gross <colesbury@gmail.com>
Mon, 24 Jun 2024 18:08:23 +0000 (14:08 -0400)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 18:08:23 +0000 (14:08 -0400)
commitdee63cb35971b87a09ddda5d6f29cd941f570720
treed85aeddbf77b7f2f990ec570688fb716a6e85375
parent0153fd094019b84e18b8e8451019694595f67f9e
gh-120860: Fix a few bugs in `type_setattro` error paths. (#120861)

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.
Objects/typeobject.c