From 467a67e74d9ead0440cffb58d5fc299e477b26f0 Mon Sep 17 00:00:00 2001
From: Vladimir Marangozov <vladimir.marangozov@t-online.de>
Date: Sat, 15 Jul 2000 03:31:31 +0000
Subject: Fix in PyList_New().  With GC enabled and when out of memory, free()
 the GC pointer, not the object pointer.

---
 Objects/listobject.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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();
 		}
 	}
-- 
cgit v0.12

