From 2a03ed034edc6bb2db6fb972b2efe08db5145a28 Mon Sep 17 00:00:00 2001 From: Eric Snow Date: Wed, 15 Mar 2023 18:43:54 -0600 Subject: gh-102660: Fix Refleaks in import.c (#102744) gh-102661 introduced some leaks. This fixes them. https://github.com/python/cpython/issues/102660 --- Python/sysmodule.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'Python/sysmodule.c') diff --git a/Python/sysmodule.c b/Python/sysmodule.c index fc0550266b..d282104dca 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -3425,9 +3425,6 @@ _PySys_Create(PyThreadState *tstate, PyObject **sysmod_p) return _PyStatus_ERR("failed to create a module object"); } - /* m_copy of Py_None means it is copied some other way. */ - sysmodule.m_base.m_copy = Py_NewRef(Py_None); - PyObject *sysdict = PyModule_GetDict(sysmod); if (sysdict == NULL) { goto error; -- cgit v1.2.1