fix a memleak in tiff pyr to memory

we were not freeing layers other than the top layer
This commit is contained in:
John Cupitt 2019-06-06 10:20:14 +01:00
parent bddbecffaf
commit dc16f1253a
3 changed files with 5 additions and 0 deletions

View File

@ -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]

View File

@ -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;

View File

@ -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 );
}