diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2008-06-13 06:00:46 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2008-06-13 06:00:46 +0000 |
commit | e9ee44c25b47e676b1b691cda5d75340b6f182fe (patch) | |
tree | 5344773fc5b10568fbf46e813291f494302551af | |
parent | a4dd2e20e2302cc41a027cae5d0057dc2dff2ba6 (diff) | |
download | cpython-git-e9ee44c25b47e676b1b691cda5d75340b6f182fe.tar.gz |
Check for memory alloc failure
-rw-r--r-- | Modules/_ctypes/callproc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c index d2727e49ea..b16d7b071a 100644 --- 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])); |