diff --git a/Objects/listobject.c b/Objects/listobject.c index 4a98c8e54ab03f..44c2545950cb87 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -3258,10 +3258,8 @@ _PyList_AsTupleAndClear(PyListObject *self) Py_BEGIN_CRITICAL_SECTION(self); PyObject **items = self->ob_item; Py_ssize_t size = Py_SIZE(self); - self->ob_item = NULL; Py_SET_SIZE(self, 0); ret = _PyTuple_FromArraySteal(items, size); - free_list_items(items, false); Py_END_CRITICAL_SECTION(); return ret; }