mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00: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:
parent
675b97a6ab
commit
2a03ed034e
3 changed files with 28 additions and 28 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue