mirror of
https://github.com/python/cpython.git
synced 2026-01-06 07:22:09 +00:00
gh-109700: fix memory error handling in `PyDict_SetDefault` (#136338)
(cherry picked from commit d22e073d2b)
This commit is contained in:
parent
ce21b1a250
commit
823bf76d37
2 changed files with 2 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
Fix memory error handling in :c:func:`PyDict_SetDefault`.
|
||||
|
|
@ -4340,6 +4340,7 @@ dict_setdefault_ref_lock_held(PyObject *d, PyObject *key, PyObject *default_valu
|
|||
if (result) {
|
||||
*result = NULL;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
MAINTAIN_TRACKING(mp, key, value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue