mirror of
https://github.com/python/cpython.git
synced 2025-12-05 00:52:25 +00:00
gh-83004: Clean up refleak in _zoneinfo initialisation (#98842)
This commit is contained in:
parent
99e2e60cb2
commit
31f2f6568d
2 changed files with 4 additions and 2 deletions
|
|
@ -0,0 +1 @@
|
||||||
|
Clean up refleak on failed module initialisation in :mod:`_zoneinfo`
|
||||||
|
|
@ -2657,8 +2657,9 @@ zoneinfomodule_exec(PyObject *m)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
Py_INCREF(&PyZoneInfo_ZoneInfoType);
|
if (PyModule_AddObjectRef(m, "ZoneInfo", (PyObject *)&PyZoneInfo_ZoneInfoType) < 0) {
|
||||||
PyModule_AddObject(m, "ZoneInfo", (PyObject *)&PyZoneInfo_ZoneInfoType);
|
goto error;
|
||||||
|
}
|
||||||
|
|
||||||
/* Populate imports */
|
/* Populate imports */
|
||||||
_tzpath_find_tzfile =
|
_tzpath_find_tzfile =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue