mirror of
https://github.com/python/cpython.git
synced 2026-05-06 20:51:17 -04:00
gh-102660: Fix Refleaks in import.c (#102744)
gh-102661 introduced some leaks. This fixes them. https://github.com/python/cpython/issues/102660
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user