summaryrefslogtreecommitdiffstats
path: root/Python/interpconfig.c
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2024-04-03 01:10:26 (GMT)
committerGitHub <noreply@github.com>2024-04-03 01:10:26 (GMT)
commit65524ab38875bb0b89fb499531bb772a4fb45b01 (patch)
tree3a885f3c0450bcf4699e69f6d429830c5b8549d1 /Python/interpconfig.c
parent857d3151c9efa029268e8249e91d26eb1b31c2fd (diff)
downloadcpython-65524ab38875bb0b89fb499531bb772a4fb45b01.zip
cpython-65524ab38875bb0b89fb499531bb772a4fb45b01.tar.gz
cpython-65524ab38875bb0b89fb499531bb772a4fb45b01.tar.bz2
gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491)
This is a follow-up to gh-117170 and gh-117485.
Diffstat (limited to 'Python/interpconfig.c')
-rw-r--r--Python/interpconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/interpconfig.c b/Python/interpconfig.c
index 419f40a..54e5dca 100644
--- a/Python/interpconfig.c
+++ b/Python/interpconfig.c
@@ -210,6 +210,8 @@ interp_config_from_dict(PyObject *origdict, PyInterpreterConfig *config,
"config dict has %d extra items (%R)", unused, dict);
goto error;
}
+
+ Py_DECREF(dict);
return 0;
error: