Merge pull request #1214 from lovell/profile-load-build-leak

Ensure ICC profile data is freed after use (master)
This commit is contained in:
John Cupitt 2019-01-16 22:33:53 +00:00 committed by GitHub
commit d33227b3c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,7 +136,7 @@ vips_profile_load_build( VipsObject *object )
} }
else if( (data = vips__file_read_name( load->name, else if( (data = vips__file_read_name( load->name,
vips__icc_dir(), &length )) ) { vips__icc_dir(), &length )) ) {
profile = vips_blob_new( NULL, data, length ); profile = vips_blob_new( (VipsCallbackFn) g_free, data, length );
} }
else { else {
vips_error( class->nickname, vips_error( class->nickname,