From b8a2b5b907d149453bb9e1f8d1a66372ab6c9519 Mon Sep 17 00:00:00 2001 From: homm Date: Mon, 3 Nov 2014 03:09:38 +0300 Subject: [PATCH] typo. Free mem after ModeError. --- libImaging/Antialias.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libImaging/Antialias.c b/libImaging/Antialias.c index 03b6767bf..25d2461cc 100644 --- a/libImaging/Antialias.c +++ b/libImaging/Antialias.c @@ -106,11 +106,8 @@ static float inline i2f(int v) { return (float) v; } Imaging -ImagingStretchHorizaontal(Imaging imIn, int xsize, int filter) +ImagingStretchHorizontal(Imaging imIn, int xsize, int filter) { - /* FIXME: this is a quick and straightforward translation from a - python prototype. might need some further C-ification... */ - ImagingSectionCookie cookie; Imaging imOut; struct filter *filterp; @@ -268,14 +265,15 @@ ImagingStretchHorizaontal(Imaging imIn, int xsize, int filter) break; default: ImagingSectionLeave(&cookie); + ImagingDelete(imOut); + free(kk); + free(xbounds); return (Imaging) ImagingError_ModeError(); } } ImagingSectionLeave(&cookie); - free(kk); free(xbounds); - return imOut; } @@ -305,7 +303,7 @@ ImagingStretch(Imaging imIn, int xsize, int ysize, int filter) return (Imaging) ImagingError_ModeError(); /* two-pass resize, first pass */ - imTemp1 = ImagingStretchHorizaontal(imIn, xsize, filter); + imTemp1 = ImagingStretchHorizontal(imIn, xsize, filter); if ( ! imTemp1) return NULL; @@ -316,7 +314,7 @@ ImagingStretch(Imaging imIn, int xsize, int ysize, int filter) return NULL; /* second pass */ - imTemp3 = ImagingStretchHorizaontal(imTemp2, ysize, filter); + imTemp3 = ImagingStretchHorizontal(imTemp2, ysize, filter); ImagingDelete(imTemp2); if ( ! imTemp3) return NULL;