mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
gh-111178: Fix _PyLegacyEventHandler_Type deallocator (#131193)
Don't use PyObject_Free() as tp_dealloc to avoid an undefined behavior. Instead, use the default deallocator which just calls tp_free which is PyObject_Free().
This commit is contained in:
parent
96492785b2
commit
0ddfb5717f
1 changed files with 0 additions and 1 deletions
|
@ -382,7 +382,6 @@ PyTypeObject _PyLegacyEventHandler_Type = {
|
|||
PyVarObject_HEAD_INIT(&PyType_Type, 0)
|
||||
"sys.legacy_event_handler",
|
||||
sizeof(_PyLegacyEventHandler),
|
||||
.tp_dealloc = (destructor)PyObject_Free,
|
||||
.tp_vectorcall_offset = offsetof(_PyLegacyEventHandler, vectorcall),
|
||||
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
|
||||
Py_TPFLAGS_HAVE_VECTORCALL | Py_TPFLAGS_DISALLOW_INSTANTIATION,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue