10000 gh-109700: fix memory error handling in `PyDict_SetDefault` (#136338) · python/cpython@d22e073 · GitHub
[go: up one dir, main page]

Skip to content

Commit d22e073

Browse files
gh-109700: fix memory error handling in PyDict_SetDefault (#136338)
1 parent 06e347b commit d22e073

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix memory error handling in :c:func:`PyDict_SetDefault`.

Objects/dictobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4411,6 +4411,7 @@ dict_setdefault_ref_lock_held(PyObject *d, PyObject *key, PyObject *default_valu
44114411
if (result) {
44124412
*result = NULL;
44134413
}
4414+
return -1;
44144415
}
44154416

44164417
STORE_USED(mp, mp->ma_used + 1);

0 commit comments

Comments
 (0)
0