mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue