diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 71e9764ec3d..63d0ca75ace 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -503,7 +503,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky) #ifdef WITH_CYCLE_GC PyGC_Head *g = PyObject_AS_GC((PyObject *)v); PyObject_GC_Fini((PyObject *)v); - sv = (PyTupleObject *) + g = (PyTupleObject *) PyObject_REALLOC((char *)g, sizeof(PyTupleObject) + PyGC_HEAD_SIZE + newsize * sizeof(PyObject *));