From 65524ab38875bb0b89fb499531bb772a4fb45b01 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Tue, 2 Apr 2024 19:10:26 -0600 Subject: [PATCH] gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491) This is a follow-up to gh-117170 and gh-117485. --- Python/interpconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Python/interpconfig.c b/Python/interpconfig.c index 419f40ae62a..54e5dca284c 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: