Fix in PyList_New(). With GC enabled and when out of memory,

free() the GC pointer, not the object pointer.
This commit is contained in:
Vladimir Marangozov 2000-07-15 03:31:31 +00:00
parent 5ff2ac2fa9
commit 467a67e74d

View file

@ -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();
}
}