mirror of
https://github.com/python/cpython.git
synced 2025-12-31 04:23:37 +00:00
gh-111178: Fix PyRangeIter_Type deallocator (#131162)
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
36978f7ef3
commit
0c6c52f496
1 changed files with 1 additions and 1 deletions
|
|
@ -910,7 +910,7 @@ PyTypeObject PyRangeIter_Type = {
|
|||
sizeof(_PyRangeIterObject), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)PyObject_Free, /* tp_dealloc */
|
||||
0, /* tp_dealloc */
|
||||
0, /* tp_vectorcall_offset */
|
||||
0, /* tp_getattr */
|
||||
0, /* tp_setattr */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue