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:
parent
e807da807c
commit
19cb193244
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue