From 34afabbf18c3c9ec60309791cced6c3709c35e1b Mon Sep 17 00:00:00 2001 From: homm Date: Fri, 27 May 2016 07:24:53 +0300 Subject: [PATCH] return malloc where clearing is not required --- libImaging/Resample.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libImaging/Resample.c b/libImaging/Resample.c index ccc3a22bd..11fc2969e 100644 --- a/libImaging/Resample.c +++ b/libImaging/Resample.c @@ -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);