mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[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:
parent
3ea7276a8e
commit
5b65df7925
2 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue