From: Armin Rigo Date: Thu, 29 Jul 2004 10:56:55 +0000 (+0000) Subject: Minor memory leak. X-Git-Tag: v2.4a2~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f414fc4004fde1118f15efe73f93e2d12d91d82c;p=thirdparty%2FPython%2Fcpython.git Minor memory leak. --- diff --git a/Objects/listobject.c b/Objects/listobject.c index e9f37b3493b2..ab8cc1f63269 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -536,6 +536,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) p = recycle = PyMem_NEW(PyObject *, (ihigh-ilow)); if (recycle == NULL) { PyErr_NoMemory(); + Py_XDECREF(v_as_SF); return -1; } } @@ -556,6 +557,7 @@ list_ass_slice(PyListObject *a, int ilow, int ihigh, PyObject *v) if (list_resize(a, s+d) == -1) { if (recycle != NULL) PyMem_DEL(recycle); + Py_XDECREF(v_as_SF); return -1; } item = a->ob_item;