SIGN IN SIGN UP

[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>
M
Miss Islington (bot) committed
6aee5edb84cfa23f430091270a4118e51894c767
Parent: 9769b7a
Committed by GitHub <noreply@github.com> on 6/24/2024, 6:33:39 PM