diff --git a/ChangeLog b/ChangeLog index 51483680..67ad086c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ - better magickload error messages - more consistent behaviour for page-height metadata - fix for composite with many small images and some combinations of blend modes +- fix memleak in tiff pyr save to memory [scossu] 21/9/18 started 8.8.0 - much faster smartcrop [lovell] diff --git a/libvips/foreign/tiff.c b/libvips/foreign/tiff.c index 07720a15..1f6d1567 100644 --- a/libvips/foreign/tiff.c +++ b/libvips/foreign/tiff.c @@ -418,6 +418,9 @@ vips__tiff_openout_buffer( VipsImage *image, printf( "vips__tiff_openout_buffer:\n" ); #endif /*DEBUG*/ + g_assert( out_data ); + g_assert( out_length ); + buffer = VIPS_NEW( image, VipsTiffOpenoutBuffer ); vips_dbuf_init( &buffer->dbuf ); buffer->out_data = out_data; diff --git a/libvips/foreign/vips2tiff.c b/libvips/foreign/vips2tiff.c index a9e65e21..5f51164d 100644 --- a/libvips/foreign/vips2tiff.c +++ b/libvips/foreign/vips2tiff.c @@ -835,6 +835,7 @@ layer_free( Layer *layer ) VIPS_UNREF( layer->strip ); VIPS_UNREF( layer->copy ); VIPS_UNREF( layer->image ); + VIPS_FREE( layer->buf ); VIPS_FREEF( TIFFClose, layer->tif ); }