Return ImagingError_MemoryError

This commit is contained in:
Christoph Gohlke 2020-12-19 19:35:21 -08:00 committed by GitHub
parent fd4b0609ef
commit 15dd7aef9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,7 +54,7 @@ ImagingHistogramNew(Imaging im)
h->histogram = calloc(im->pixelsize, 256 * sizeof(long));
if (h->histogram == NULL) {
free(h);
return NULL;
return (ImagingHistogram) ImagingError_MemoryError();
}
return h;