We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5be0d8 commit e1bedf7Copy full SHA for e1bedf7
1 file changed
Modules/_ctypes/_ctypes.c
@@ -673,6 +673,7 @@ StructUnionType_paramfunc(ctypes_state *st, CDataObject *self)
673
if ((size_t)self->b_size > sizeof(void*)) {
674
ptr = PyMem_Malloc(self->b_size);
675
if (ptr == NULL) {
676
+ PyErr_NoMemory();
677
return NULL;
678
}
679
memcpy(ptr, self->b_ptr, self->b_size);
0 commit comments