From e13f6bf6b6077d75782ae45e85b81e54c4340732 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 28 Aug 2014 11:51:22 +0100 Subject: [PATCH 1/3] Ensure read_free is called for WebP buffer data --- libvips/foreign/webp2vips.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvips/foreign/webp2vips.c b/libvips/foreign/webp2vips.c index 5fde4622..1975df42 100644 --- a/libvips/foreign/webp2vips.c +++ b/libvips/foreign/webp2vips.c @@ -298,6 +298,8 @@ vips__webp_read_buffer( void *buf, size_t len, VipsImage *out ) if( read_image( read, out ) ) return( -1 ); + read_free( read ); + return( 0 ); } From bdf7126e8fc6e3e119ab0229a8c699cbf439f8b4 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 28 Aug 2014 15:54:10 +0100 Subject: [PATCH 2/3] Correct VipsArea ref count in PNG buffer output --- libvips/foreign/pngsave.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvips/foreign/pngsave.c b/libvips/foreign/pngsave.c index 6bacf39d..50465ac8 100644 --- a/libvips/foreign/pngsave.c +++ b/libvips/foreign/pngsave.c @@ -211,6 +211,8 @@ vips_foreign_save_png_buffer_build( VipsObject *object ) g_object_set( object, "buffer", area, NULL ); + vips_area_unref( area ); + return( 0 ); } From 70b35f5ec5bbf707a818de5c5c48a20d3e6b0d22 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Thu, 28 Aug 2014 16:44:03 +0100 Subject: [PATCH 3/3] update ChangeLog --- ChangeLog | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b63a1b8a..a065aaa8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,10 @@ 21/8/14 started 7.40.7 -- fix matlab load +- width and height were swapped in matlab load +- set interpretation more carefully on matlab load - fix memleak in tilecache [Lovell] - fix memleak in VipsArray [Lovell] +- fix memleak in webp load from buffer [Lovell] +- fix memleak in png save to buffer [Lovell] 12/8/14 started 7.40.6 - more doc fixes