return -1;
}
- self->lines = PyMem_RawCalloc(self->num_lines, sizeof(PyObject *));
+ self->lines = PyMem_Calloc(self->num_lines, sizeof(PyObject *));
if (!self->lines) {
PyErr_SetString(PyExc_MemoryError, "Out of memory");
return -1;
iter = PyObject_GetIter(lines);
if (!iter) {
- PyMem_RawFree(self->lines);
+ PyMem_Free(self->lines);
return -1;
}
for (--i; i >= 0; i--)
Py_DECREF(self->lines[i]);
}
- PyMem_RawFree(self->lines);
+ PyMem_Free(self->lines);
self->lines = NULL;
return -1;
for (i = 0; i < self->num_lines; i++)
Py_DECREF(self->lines[i]);
- PyMem_RawFree(self->lines);
+ PyMem_Free(self->lines);
}
static PyObject *gpiod_LineBulk_iternext(gpiod_LineBulkObject *self)