gh-109700: fix memory error handling in PyDict_SetDefault (#136338)

This commit is contained in:
Kumar Aditya 2025-07-06 20:48:11 +05:30 committed by GitHub
parent 06e347b846
commit d22e073d2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 0 deletions

View file

@ -0,0 +1 @@
Fix memory error handling in :c:func:`PyDict_SetDefault`.

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);