summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2015-04-23 21:06:45 (GMT)
committerBenjamin Peterson <benjamin@python.org>2015-04-23 21:06:45 (GMT)
commita30e2256f70bd43255e8dae6459c70540f118b62 (patch)
treef16541ea402882378ae4b6153d2db9d15b63303c /Objects
parentc314e28766fb58451488b38abdabc6161715e407 (diff)
parentbd91ee9cd78ac41ae37ffb06c4d711848cdf4bb0 (diff)
downloadcpython-a30e2256f70bd43255e8dae6459c70540f118b62.zip
cpython-a30e2256f70bd43255e8dae6459c70540f118b62.tar.gz
cpython-a30e2256f70bd43255e8dae6459c70540f118b62.tar.bz2
merge 3.4 (#24044)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/listobject.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index 8f88d18..45e54ce 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -1961,8 +1961,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++) {