Mailing List Archive

gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491)
https://github.com/python/cpython/commit/65524ab38875bb0b89fb499531bb772a4fb45b01
commit: 65524ab38875bb0b89fb499531bb772a4fb45b01
branch: main
author: Eric Snow <ericsnowcurrently@gmail.com>
committer: ericsnowcurrently <ericsnowcurrently@gmail.com>
date: 2024-04-03T01:10:26Z
summary:

gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491)

This is a follow-up to gh-117170 and gh-117485.

files:
M Python/interpconfig.c

diff --git a/Python/interpconfig.c b/Python/interpconfig.c
index 419f40ae62a89e..54e5dca284c215 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:

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-leave@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: list-python-checkins@lists.gossamer-threads.com