This commit is contained in:
Kovid Goyal 2017-08-28 15:03:03 +05:30
parent 564010c7cd
commit bab4680828
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -33,7 +33,7 @@ new(PyTypeObject *type, PyObject *args, PyObject UNUSED *kwds) {
self->buf = PyMem_Calloc(xnum * ynum, sizeof(Cell));
self->continued_map = PyMem_Calloc(ynum, sizeof(bool));
self->line = alloc_line();
if (self->buf == NULL || self->line == NULL || self->continued_map) {
if (self->buf == NULL || self->line == NULL || self->continued_map == NULL) {
PyErr_NoMemory();
PyMem_Free(self->buf); Py_CLEAR(self->line); PyMem_Free(self->continued_map);
Py_CLEAR(self);