From: Victor Stinner Date: Wed, 30 Dec 2020 01:24:43 +0000 (+0100) Subject: bpo-40137: Fix refleak in _functools_exec() (GH-24006) X-Git-Tag: v3.10.0a4~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ba0e49a4648e727d1a16b3ce479499eb39f22311;p=thirdparty%2FPython%2Fcpython.git bpo-40137: Fix refleak in _functools_exec() (GH-24006) --- diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index b121ec7d1411..1fcaf299e67b 100644 --- a/Modules/_functoolsmodule.c +++ b/Modules/_functoolsmodule.c @@ -1436,6 +1436,7 @@ _functools_exec(PyObject *module) Py_DECREF(lru_cache_type); return -1; } + Py_DECREF(lru_cache_type); state->keyobject_type = (PyTypeObject *)PyType_FromModuleAndSpec(module, &keyobject_type_spec, NULL);