mirror of
https://github.com/python/cpython.git
synced 2026-04-16 08:41:19 +00:00
[3.13] gh-146244: Fix initconfig.c SET_ITEM macro leaks dict on expression failure (GH-146246) (GH-146433)
(cherry picked from commit 9343518c6f)
Co-authored-by: Wulian233 <1055917385@qq.com>
This commit is contained in:
parent
5a4959b92c
commit
fc4b4221e5
1 changed files with 1 additions and 1 deletions
|
|
@ -353,7 +353,7 @@ _Py_COMP_DIAG_IGNORE_DEPR_DECLS
|
|||
do { \
|
||||
obj = (EXPR); \
|
||||
if (obj == NULL) { \
|
||||
return NULL; \
|
||||
goto fail; \
|
||||
} \
|
||||
int res = PyDict_SetItemString(dict, (KEY), obj); \
|
||||
Py_DECREF(obj); \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue