8000 gh-111178: Fix _PyLegacyEventHandler_Type deallocator (#131193) · python/cpython@0ddfb57 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0ddfb57

Browse files
authored
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().
1 parent 9649278 commit 0ddfb57

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

Python/legacy_tracing.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,6 @@ PyTypeObject _PyLegacyEventHandler_Type = {
382382
PyVarObject_HEAD_INIT(&PyType_Type, 0)
383383
"sys.legacy_event_handler",
384384
sizeof(_PyLegacyEventHandler),
385-
.tp_dealloc = (destructor)PyObject_Free,
386385
.tp_vectorcall_offset = offsetof(_PyLegacyEventHandler, vectorcall),
387386
.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE |
388387
Py_TPFLAGS_HAVE_VECTORCALL | Py_TPFLAGS_DISALLOW_INSTANTIATION,

0 commit comments

Comments
 (0)
0