Skip to content

Commit d62c8bc

Browse files
kumaraditya303miss-islington
authored andcommitted
gh-109700: fix memory error handling in PyDict_SetDefault (GH-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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy