]> granicus.if.org Git - python/commitdiff
Fix memory error treatment correctly. Going to dsu_fail causes
authorHye-Shik Chang <hyeshik@gmail.com>
Wed, 10 Dec 2003 07:31:08 +0000 (07:31 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Wed, 10 Dec 2003 07:31:08 +0000 (07:31 +0000)
deallocating garbage pointers; saved_ob_item and empty_ob_item.
(Reviewed by Raymond Hettinger)

Objects/listobject.c

index ce3ac6d3543b4d60f6b202ac6994d0f9cd42d9e8..7d5c8b4ec1678208e7981669d913c8ac615f6940 100644 (file)
@@ -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);