Commit 701efe41 authored by Martin v. Löwis's avatar Martin v. Löwis

Correctly use realloc return value. Fixes bug #114424.

parent c4fef083
......@@ -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 *));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment