mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
[3.12] gh-86493: Fix possible leaks in some modules initialization (GH-106768) (GH-106855)
Fix _ssl, _stat, _testinternalcapi, _threadmodule, cmath, math, posix, time.
(cherry picked from commit 3e65baee72
)
This commit is contained in:
parent
b79f3b36c3
commit
a423ddbdea
10 changed files with 46 additions and 62 deletions
|
@ -1092,8 +1092,8 @@ static PyMethodDef module_functions[] = {
|
|||
static int
|
||||
module_exec(PyObject *module)
|
||||
{
|
||||
if (PyModule_AddObject(module, "SIZEOF_PYGC_HEAD",
|
||||
PyLong_FromSsize_t(sizeof(PyGC_Head))) < 0) {
|
||||
if (_PyModule_Add(module, "SIZEOF_PYGC_HEAD",
|
||||
PyLong_FromSsize_t(sizeof(PyGC_Head))) < 0) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue