mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
return malloc
This commit is contained in:
parent
555d2ace49
commit
1c3def1d5a
|
@ -103,11 +103,11 @@ ImagingPrecompute(int inSize, int outSize, struct filter *filterp,
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* coefficient buffer */
|
/* coefficient buffer */
|
||||||
kk = calloc(outSize * kmax, sizeof(double));
|
kk = malloc(outSize * kmax * sizeof(double));
|
||||||
if ( ! kk)
|
if ( ! kk)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
xbounds = calloc(outSize * 2, sizeof(int));
|
xbounds = malloc(outSize * 2 * sizeof(int));
|
||||||
if ( ! xbounds) {
|
if ( ! xbounds) {
|
||||||
free(kk);
|
free(kk);
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -160,7 +160,7 @@ ImagingResampleHorizontal_8bpc(Imaging imIn, int xsize, struct filter *filterp)
|
||||||
return (Imaging) ImagingError_MemoryError();
|
return (Imaging) ImagingError_MemoryError();
|
||||||
}
|
}
|
||||||
|
|
||||||
kk = calloc(xsize * kmax, sizeof(int));
|
kk = malloc(xsize * kmax * sizeof(int));
|
||||||
if ( ! kk) {
|
if ( ! kk) {
|
||||||
free(xbounds);
|
free(xbounds);
|
||||||
free(prekk);
|
free(prekk);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user