summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-15 03:31:31 (GMT)
committerVladimir Marangozov <vladimir.marangozov@t-online.de>2000-07-15 03:31:31 (GMT)
commit467a67e74d9ead0440cffb58d5fc299e477b26f0 (patch)
tree70ac3fa711a06399c283fe52d2daf7d1a4cb1c90
parent5ff2ac2fa96f2f58f574bdf5c07817bb8903fe2d (diff)
downloadcpython-467a67e74d9ead0440cffb58d5fc299e477b26f0.zip
cpython-467a67e74d9ead0440cffb58d5fc299e477b26f0.tar.gz
cpython-467a67e74d9ead0440cffb58d5fc299e477b26f0.tar.bz2
Fix in PyList_New(). With GC enabled and when out of memory,
free() the GC pointer, not the object pointer.
-rw-r--r--Objects/listobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/listobject.c b/Objects/listobject.c
index e85e2f4..52640fb 100644
--- a/Objects/listobject.c
+++ b/Objects/listobject.c
@@ -60,7 +60,7 @@ PyList_New(int size)
else {
op->ob_item = (PyObject **) PyMem_MALLOC(nbytes);
if (op->ob_item == NULL) {
- PyObject_FREE(op);
+ PyObject_FREE(PyObject_AS_GC(op));
return PyErr_NoMemory();
}
}