8000 gh-111178: Fix PyRangeIter_Type deallocator (#131162) · plashchynski/cpython@90a66d5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 90a66d5

Browse files
vstinnerplashchynski
authored andcommitted
pythongh-111178: Fix PyRangeIter_Type deallocator (python#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().
1 parent 3ab9b60 commit 90a66d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/rangeobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ PyTypeObject PyRangeIter_Type = {
910910
sizeof(_PyRangeIterObject), /* tp_basicsize */
911911
0, /* tp_itemsize */
912912
/* methods */
913-
(destructor)PyObject_Free, /* tp_dealloc */
913+
0, /* tp_dealloc */
914914
0, /* tp_vectorcall_offset */
915915
0, /* tp_getattr */
916916
0, /* tp_setattr */

0 commit comments

Comments
 (0)
0