[3.14] gh-109700: fix memory error handling in PyDict_SetDefault (GH-136338) (#136340)

gh-109700: fix memory error handling in `PyDict_SetDefault` (GH-136338)
(cherry picked from commit d22e073d2b)

Co-authored-by: Kumar Aditya <kumaraditya@python.org>
This commit is contained in:
Miss Islington (bot) 2025-07-06 17:43:16 +02:00 committed by GitHub
parent 3ea7276a8e
commit 5b65df7925
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -4411,6 +4411,7 @@ dict_setdefault_ref_lock_held(PyObject *d, PyObject *key, PyObject *default_valu
if (result) {
*result = NULL;
}
return -1;
}
STORE_USED(mp, mp->ma_used + 1);