[Python-checkins] r64219 - python/trunk/Modules/_ctypes/callproc.c
neal.norwitz
python-checkins at python.org
Fri Jun 13 08:00:46 CEST 2008
Author: neal.norwitz
Date: Fri Jun 13 08:00:46 2008
New Revision: 64219
Log:
Check for memory alloc failure
Modified:
python/trunk/Modules/_ctypes/callproc.c
Modified: python/trunk/Modules/_ctypes/callproc.c
==============================================================================
--- python/trunk/Modules/_ctypes/callproc.c (original)
+++ python/trunk/Modules/_ctypes/callproc.c Fri Jun 13 08:00:46 2008
@@ -1849,6 +1849,8 @@
return NULL;
}
shape = PyTuple_New(dict->ndim);
+ if (shape == NULL)
+ return NULL;
for (i = 0; i < (int)dict->ndim; ++i)
PyTuple_SET_ITEM(shape, i, PyLong_FromSsize_t(dict->shape[i]));
More information about the Python-checkins
mailing list