commit | 9c04257bf91df5739bc071ba07c307a8cce3063b | [log] [tgz] |
---|---|---|
author | Martin v. Löwis <martin@v.loewis.de> | Fri Feb 15 19:11:46 2008 +0000 |
committer | Martin v. Löwis <martin@v.loewis.de> | Fri Feb 15 19:11:46 2008 +0000 |
tree | be1dc8b466aa702c99001bdbcf43549cee88bde9 | |
parent | c7cf36e501cd9b9fa42a86550a3adfce18e8a64a [diff] |
Fix deallocation of array objects when allocation ran out of memory.
diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index da6e88f..eafea98 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c
@@ -439,6 +439,7 @@ else { op->ob_item = PyMem_NEW(char, nbytes); if (op->ob_item == NULL) { + _Py_ForgetReference(op); PyObject_Del(op); return PyErr_NoMemory(); }