From 4b0c2924ab4993228b6824386fe200ea0c5a86fc Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Sat, 21 Dec 2019 04:46:16 +0000 Subject: [PATCH] fix refleak in dzsave --- libvips/foreign/dzsave.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvips/foreign/dzsave.c b/libvips/foreign/dzsave.c index f2866a54..3f43ebcb 100644 --- a/libvips/foreign/dzsave.c +++ b/libvips/foreign/dzsave.c @@ -1594,12 +1594,14 @@ strip_work( VipsThreadState *state, void *a ) g_mutex_unlock( vips__global_lock ); if( write_image( dz, out, x, dz->suffix ) ) { + g_object_unref( out ); g_object_unref( x ); return( -1 ); } g_object_unref( out ); + g_object_unref( x ); #ifdef DEBUG_VERBOSE printf( "strip_work: success\n" );