diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-04-23 21:05:07 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-04-23 21:05:07 (GMT) |
commit | 51454a62e235f27c28a24620c3df002d4076b57c (patch) | |
tree | fba1d8ad7d285be8201b93c13c3682ee4abbc4cc /Objects | |
parent | 418fd74f87756c4312db496db92118bba2c4484a (diff) | |
parent | 0823ffb2fb16aa29cefd4c1b91edd82d9814e46a (diff) | |
download | cpython-51454a62e235f27c28a24620c3df002d4076b57c.zip cpython-51454a62e235f27c28a24620c3df002d4076b57c.tar.gz cpython-51454a62e235f27c28a24620c3df002d4076b57c.tar.bz2 |
merge 3.2 (#24044)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/listobject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c index ae36577..297edf1 100644 --- a/Objects/listobject.c +++ b/Objects/listobject.c @@ -1953,8 +1953,10 @@ listsort(PyListObject *self, PyObject *args, PyObject *kwds) keys = &ms.temparray[saved_ob_size+1]; else { keys = PyMem_MALLOC(sizeof(PyObject *) * saved_ob_size); - if (keys == NULL) - return NULL; + if (keys == NULL) { + PyErr_NoMemory(); + goto keyfunc_fail; + } } for (i = 0; i < saved_ob_size ; i++) { |