mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-109700: fix memory error handling in PyDict_SetDefault
(#136338)
This commit is contained in:
parent
06e347b846
commit
d22e073d2b
2 changed files with 2 additions and 0 deletions
|
@ -0,0 +1 @@
|
||||||
|
Fix memory error handling in :c:func:`PyDict_SetDefault`.
|
|
@ -4411,6 +4411,7 @@ dict_setdefault_ref_lock_held(PyObject *d, PyObject *key, PyObject *default_valu
|
||||||
if (result) {
|
if (result) {
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
}
|
}
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
STORE_USED(mp, mp->ma_used + 1);
|
STORE_USED(mp, mp->ma_used + 1);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue