diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-10 07:31:08 (GMT) |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2003-12-10 07:31:08 (GMT) |
commit | 19cb193244a9ac524fa8cc9d1074c32322c6604a (patch) | |
tree | 4da176ed08afe48befbe9a49f962e3a31b1766db /Objects | |
parent | e807da807cb558168f72fd715672f46b0f599d88 (diff) | |
download | cpython-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)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/listobject.c | 2 |
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); |