Issue #19437: Fix PyCData_GetContainer() of ctypes, handle PyDict_New() failure

This commit is contained in:
Victor Stinner 2013-11-13 13:23:35 +01:00
parent 22af2599a9
commit 7184366dab

View file

@ -2331,6 +2331,8 @@ PyCData_GetContainer(CDataObject *self)
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;