From 8a44d6f7b3c96c545850b4a802e711f71ed3224e Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Tue, 11 Nov 2014 20:42:26 +0000 Subject: [PATCH] fix memleak in sharpen see https://github.com/jcupitt/libvips/issues/194 --- ChangeLog | 1 + libvips/convolution/sharpen.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 85906a06..fc95d165 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 27/10/14 started 7.40.12 - better tiff detection (Lovell) +- fix memleak in sharpen (Lovell) 8/10/14 started 7.40.11 - rework extra band handling for colour functions diff --git a/libvips/convolution/sharpen.c b/libvips/convolution/sharpen.c index 5860b230..02603485 100644 --- a/libvips/convolution/sharpen.c +++ b/libvips/convolution/sharpen.c @@ -251,7 +251,7 @@ vips_sharpen_build( VipsObject *object ) sharpen->ix2 = ix2 = sharpen->x2 * 327.67; sharpen->ix3 = ix3 = sharpen->x3 * 327.67; - if( !(sharpen->lut = VIPS_ARRAY( sharpen->out, ix2 + ix3 + 1, int )) ) + if( !(sharpen->lut = VIPS_ARRAY( object, ix2 + ix3 + 1, int )) ) return( -1 ); for( i = 0; i < ix1; i++ ) {