From: Martin v. Löwis Date: Fri, 15 Sep 2000 07:07:46 +0000 (+0000) Subject: Correctly use realloc return value. Fixes bug #114424. X-Git-Tag: v2.0b2~303 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c58dbebf4bcc3cc2b557de0ff39e75df7532a2b2;p=thirdparty%2FPython%2Fcpython.git Correctly use realloc return value. Fixes bug #114424. --- diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index 71e9764ec3dc..63d0ca75aced 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 *));