return ImagingError_MemoryError

This commit is contained in:
Christoph Gohlke 2020-12-19 19:42:29 -08:00 committed by GitHub
parent 7673cb7549
commit d1e706d756
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3182,7 +3182,7 @@ _draw_polygon(ImagingDrawObject* self, PyObject* args)
ixy = (int*) calloc(n, 2 * sizeof(int));
if (ixy == NULL) {
free(xy);
return NULL;
return ImagingError_MemoryError();
}
for (i = 0; i < n; i++) {