bpo-40137: Fix refleak in _functools_exec() (GH-24006)

This commit is contained in:
Victor Stinner 2020-12-30 02:24:43 +01:00 committed by GitHub
parent 056c08211b
commit ba0e49a464
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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);