Fix memory error treatment correctly. Going to dsu_fail causes

deallocating garbage pointers; saved_ob_item and empty_ob_item.
(Reviewed by Raymond Hettinger)
This commit is contained in:
Hye-Shik Chang 2003-12-10 07:31:08 +00:00
parent e807da807c
commit 19cb193244
1 changed files with 1 additions and 1 deletions

View 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);