projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4dd2e2
)
Check for memory alloc failure
author
Neal Norwitz
<nnorwitz@gmail.com>
Fri, 13 Jun 2008 06:00:46 +0000
(06:00 +0000)
committer
Neal Norwitz
<nnorwitz@gmail.com>
Fri, 13 Jun 2008 06:00:46 +0000
(06:00 +0000)
Modules/_ctypes/callproc.c
patch
|
blob
|
history
diff --git
a/Modules/_ctypes/callproc.c
b/Modules/_ctypes/callproc.c
index d2727e49ea11ff001f58f0efc71854c316e91c84..b16d7b071a0ad5373fc2cc7ebf86077ac79e650c 100644
(file)
--- a/
Modules/_ctypes/callproc.c
+++ b/
Modules/_ctypes/callproc.c
@@
-1849,6
+1849,8
@@
buffer_info(PyObject *self, PyObject *arg)
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]));