From: Hye-Shik Chang Date: Wed, 10 Dec 2003 07:31:08 +0000 (+0000) Subject: Fix memory error treatment correctly. Going to dsu_fail causes X-Git-Tag: v2.4a1~1117 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19cb193244a9ac524fa8cc9d1074c32322c6604a;p=thirdparty%2FPython%2Fcpython.git Fix memory error treatment correctly. Going to dsu_fail causes deallocating garbage pointers; saved_ob_item and empty_ob_item. (Reviewed by Raymond Hettinger) --- diff --git a/Objects/listobject.c b/Objects/listobject.c index ce3ac6d3543b..7d5c8b4ec167 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1866,7 +1866,7 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds) if (compare != NULL && keyfunc != NULL) { compare = build_cmpwrapper(compare); if (compare == NULL) - goto dsu_fail; + return NULL; } else Py_XINCREF(compare);