summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2003-12-10 07:31:08 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2003-12-10 07:31:08 (GMT)
commit19cb193244a9ac524fa8cc9d1074c32322c6604a (patch)
tree4da176ed08afe48befbe9a49f962e3a31b1766db
parente807da807cb558168f72fd715672f46b0f599d88 (diff)
downloadcpython-19cb193244a9ac524fa8cc9d1074c32322c6604a.zip
cpython-19cb193244a9ac524fa8cc9d1074c32322c6604a.tar.gz
cpython-19cb193244a9ac524fa8cc9d1074c32322c6604a.tar.bz2
Fix memory error treatment correctly. Going to dsu_fail causes
deallocating garbage pointers; saved_ob_item and empty_ob_item. (Reviewed by Raymond Hettinger)
-rw-r--r--Objects/listobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index ce3ac6d..7d5c8b4 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);