There was an error while loading. Please reload this page.
2 parents 291f1eb + e7ce609 commit 5e4b6e9Copy full SHA for 5e4b6e9
src/map.c
@@ -354,17 +354,21 @@ PyImaging_MapBuffer(PyObject* self, PyObject* args)
354
355
if (view.len < 0) {
356
PyErr_SetString(PyExc_ValueError, "buffer has negative size");
357
+ PyBuffer_Release(&view);
358
return NULL;
359
}
360
if (offset + size > view.len) {
361
PyErr_SetString(PyExc_ValueError, "buffer is not large enough");
362
363
364
365
366
im = ImagingNewPrologueSubtype(
367
mode, xsize, ysize, sizeof(ImagingBufferInstance));
- if (!im)
368
+ if (!im) {
369
370
371
+ }
372
373
/* setup file pointers */
374
if (ystep > 0)
0 commit comments