mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
return malloc where clearing is not required
This commit is contained in:
parent
4ea0c83450
commit
34afabbf18
|
@ -107,7 +107,7 @@ ImagingPrecompute(int inSize, int outSize, struct filter *filterp,
|
|||
if ( ! kk)
|
||||
return 0;
|
||||
|
||||
xbounds = calloc(outSize * 2, sizeof(int));
|
||||
xbounds = malloc(outSize * 2 * sizeof(int));
|
||||
if ( ! xbounds) {
|
||||
free(kk);
|
||||
return 0;
|
||||
|
@ -160,7 +160,7 @@ ImagingResampleHorizontal_8bpc(Imaging imIn, int xsize, struct filter *filterp)
|
|||
return (Imaging) ImagingError_MemoryError();
|
||||
}
|
||||
|
||||
kk = calloc(xsize * kmax, sizeof(int));
|
||||
kk = malloc(xsize * kmax * sizeof(int));
|
||||
if ( ! kk) {
|
||||
free(xbounds);
|
||||
free(prekk);
|
||||
|
|
Loading…
Reference in New Issue
Block a user