fix double free on tiff write

if you attached a profile to a tiff from a file during write, you'd get
a double-free

see https://github.com/jcupitt/libvips/issues/371
This commit is contained in:
John Cupitt 2016-01-22 17:43:42 +00:00
parent 923fb43ae9
commit 94db738773
2 changed files with 2 additions and 1 deletions

View File

@ -7,6 +7,7 @@
- use builtin isnan isinf when possible [Lovell Fuller]
- tune vips_shrinkh(), 30% faster [Lovell Fuller]
- remove SEQ hint from vips_subsample(), fixes cli performance [erdmann]
- fix double free on attach ICC profile from file in tiff write [erdmann]
1/1/16 started 8.2.1
- add a compat stub [Benjamin Gilbert]

View File

@ -888,7 +888,7 @@ write_new( VipsImage *im, const char *filename,
write->pyramid = pyramid;
write->onebit = squash;
write->miniswhite = miniswhite;
write->icc_profile = profile;
write->icc_profile = vips_strdup( NULL, profile );
write->bigtiff = bigtiff;
write->rgbjpeg = rgbjpeg;
write->properties = properties;