fix memleak in dzsave

tree elements were not being freed, thanks lovell

see https://github.com/jcupitt/libvips/issues/837
This commit is contained in:
John Cupitt 2018-01-01 11:40:04 +00:00
parent faeb68e993
commit 4c2434ab67
2 changed files with 10 additions and 4 deletions

View File

@ -7,6 +7,7 @@
- fix a memleak on error during jpeg buffer write [lovell] - fix a memleak on error during jpeg buffer write [lovell]
- fix misspelling of IPTC as IPCT [lovell] - fix misspelling of IPTC as IPCT [lovell]
- seq could be set on small images opened in random-access mode [aferrero2707] - seq could be set on small images opened in random-access mode [aferrero2707]
- fix small memleak in dzsave [lovell]
15/4/17 started 8.6.0 15/4/17 started 8.6.0
- supports fits images with leading non-image HDUs, thanks benepo - supports fits images with leading non-image HDUs, thanks benepo

View File

@ -74,7 +74,8 @@
* 18/8/17 * 18/8/17
* - shut down the output earlier to flush zip output * - shut down the output earlier to flush zip output
* 24/11/17 * 24/11/17
* - output overlap-only tiles on edges, for better deepzoom spec * - output overlap-only tiles on edges for better deepzoom spec
* compliance
*/ */
/* /*
@ -179,7 +180,7 @@
*/ */
typedef struct _VipsGsfDirectory { typedef struct _VipsGsfDirectory {
struct _VipsGsfDirectory *parent; struct _VipsGsfDirectory *parent;
const char *name; char *name;
/* List of child directories, if any. /* List of child directories, if any.
*/ */
@ -222,7 +223,7 @@ vips_gsf_tree_close( VipsGsfDirectory *tree )
return( tree ); return( tree );
} }
g_object_unref( tree->out ); VIPS_UNREF( tree->out );
} }
if( tree->container ) { if( tree->container ) {
@ -233,9 +234,13 @@ vips_gsf_tree_close( VipsGsfDirectory *tree )
return( tree ); return( tree );
} }
g_object_unref( tree->container ); VIPS_UNREF( tree->container );
} }
VIPS_FREEF( g_slist_free, tree->children );
VIPS_FREE( tree->name );
VIPS_FREE( tree );
return( NULL ); return( NULL );
} }