[Python-checkins] cpython: Issue #19437: Fix PyCData_GetContainer() of ctypes, handle PyDict_New() failure
victor.stinner
python-checkins at python.org
Wed Nov 13 13:33:29 CET 2013
http://hg.python.org/cpython/rev/a217ea1671a8
changeset: 87080:a217ea1671a8
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Nov 13 13:23:35 2013 +0100
summary:
Issue #19437: Fix PyCData_GetContainer() of ctypes, handle PyDict_New() failure
files:
Modules/_ctypes/_ctypes.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -2331,6 +2331,8 @@
if (self->b_objects == NULL) {
if (self->b_length) {
self->b_objects = PyDict_New();
+ if (self->b_objects == NULL)
+ return NULL;
} else {
Py_INCREF(Py_None);
self->b_objects = Py_None;
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list