Commit 9c04257b authored by Martin v. Löwis's avatar Martin v. Löwis

Fix deallocation of array objects when allocation ran out of memory.

parent c7cf36e5
......@@ -4,6 +4,17 @@ Python News
(editors: check NEWS.help for information about editing NEWS using ReST.)
What's New in Python 2.5.2?
=============================
*Release date: XX-Feb-2008*
Extension Modules
-----------------
- Fix deallocation of array objects when allocation ran out of memory.
What's New in Python 2.5.2c1?
=============================
......
......@@ -439,6 +439,7 @@ newarrayobject(PyTypeObject *type, Py_ssize_t size, struct arraydescr *descr)
else {
op->ob_item = PyMem_NEW(char, nbytes);
if (op->ob_item == NULL) {
_Py_ForgetReference(op);
PyObject_Del(op);
return PyErr_NoMemory();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment