]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-76785: Fix a Refleak in _interpreters.new_config() (gh-117491)
authorEric Snow <ericsnowcurrently@gmail.com>
Wed, 3 Apr 2024 01:10:26 +0000 (19:10 -0600)
committerGitHub <noreply@github.com>
Wed, 3 Apr 2024 01:10:26 +0000 (01:10 +0000)
This is a follow-up to gh-117170 and gh-117485.

Python/interpconfig.c

index 419f40ae62a89eb9a2cccdc7013d404f56c12c21..54e5dca284c215870d006e13683bda423184984d 100644 (file)
@@ -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: