diff options
author | Benjamin Peterson <benjamin@python.org> | 2015-04-23 21:06:33 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2015-04-23 21:06:33 (GMT) |
commit | bd91ee9cd78ac41ae37ffb06c4d711848cdf4bb0 (patch) | |
tree | f5d955ff0e693407ccbd2b9d0cdacccd85f75208 /Objects/listobject.c | |
parent | d98c6773fa380848b75d55e652b4d5f40ac4d785 (diff) | |
parent | 51454a62e235f27c28a24620c3df002d4076b57c (diff) | |
download | cpython-bd91ee9cd78ac41ae37ffb06c4d711848cdf4bb0.zip cpython-bd91ee9cd78ac41ae37ffb06c4d711848cdf4bb0.tar.gz cpython-bd91ee9cd78ac41ae37ffb06c4d711848cdf4bb0.tar.bz2 |
merge 3.3 (#24044)
Diffstat (limited to 'Objects/listobject.c')
-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 b6c1d78..19967ca 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++) { |