[Python-checkins] commit of r41610 - python/branches/ast-arena/Python/asdl.c

neal.norwitz python-checkins at python.org
Mon Dec 5 08:33:45 CET 2005


Author: neal.norwitz
Date: Mon Dec  5 08:33:42 2005
New Revision: 41610

Modified:
   python/branches/ast-arena/Python/asdl.c
Log:
we need to malloc the seq since we call free() on this pointer

Modified: python/branches/ast-arena/Python/asdl.c
==============================================================================
--- python/branches/ast-arena/Python/asdl.c	(original)
+++ python/branches/ast-arena/Python/asdl.c	Mon Dec  5 08:33:42 2005
@@ -8,7 +8,7 @@
 	size_t n = sizeof(asdl_seq) +
 			(size ? (sizeof(void *) * (size - 1)) : 0);
 
-	seq = (asdl_seq *)PyObject_Malloc(n);
+	seq = (asdl_seq *)malloc(n);
 	if (!seq) {
 		PyErr_NoMemory();
 		return NULL;


More information about the Python-checkins mailing list