8000 gh-109700: fix memory error handling in `PyDict_SetDefault` (GH-136338) · miss-islington/cpython@d62c8bc · GitHub
[go: up one dir, main page]

Skip to content

Commit d62c8bc

Browse files
kumaraditya303miss-islington
authored andcommitted
pythongh-109700: fix memory error handling in PyDict_SetDefault (pythonGH-136338)
(cherry picked from commit d22e073) Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 3ea7276 commit d62c8bc

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