Issue #24268: Address some PEP 489 refleaks · python/cpython@a48db2b · GitHub
Skip to content

Commit a48db2b

Browse files
committed
Issue #24268: Address some PEP 489 refleaks
- missing DECREF in PyModule_FromDefAndSpec2 - missing DECREF in PyType_FromSpecAndBases2 - missing DECREF in _testmultiphase module Patch by Petr Viktorin
1 parent d5cacbb commit a48db2b

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

Modules/_testmultiphase.c

Lines changed: 1 addition & 0 deletions

Objects/moduleobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,7 @@ PyModule_FromDefAndSpec2(struct PyModuleDef* def, PyObject *spec, int module_api
311311
}
312312
}
313313

314+
Py_DECREF(nameobj);
314315
return m;
315316

316317
error:

Objects/typeobject.c

Lines changed: 10 additions & 5 deletions

0 commit comments

Comments
 (0)