Skip to content

Commit c58dbeb

Browse files
committed
Correctly use realloc return value. Fixes bug python#114424.
1 parent ff1ce0f commit c58dbeb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/tupleobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ _PyTuple_Resize(PyObject **pv, int newsize, int last_is_sticky)
503503
#ifdef WITH_CYCLE_GC
504504
PyGC_Head *g = PyObject_AS_GC((PyObject *)v);
505505
PyObject_GC_Fini((PyObject *)v);
506-
sv = (PyTupleObject *)
506+
g = (PyTupleObject *)
507507
PyObject_REALLOC((char *)g, sizeof(PyTupleObject)
508508
+ PyGC_HEAD_SIZE
509509
+ newsize * sizeof(PyObject *));

0 commit comments

Comments
 (0)