Fixed small memleak when saving compressed TIFFs, on behalf of GreatBull; see issue #649

This commit is contained in:
Oliver Duis
2011-04-23 08:39:24 +02:00
parent 2f76b7a0c0
commit 62aa6c3707

View File

@@ -787,7 +787,7 @@ int ImageIO::saveTIFF (Glib::ustring fname, int bps, bool uncompressed) {
exif->write (8, buffer); exif->write (8, buffer);
write (TIFFFileno (out), buffer+8, exif_size); write (TIFFFileno (out), buffer+8, exif_size);
delete buffer; delete[] buffer;
// let libtiff know that scanlines or any other following stuff should go // let libtiff know that scanlines or any other following stuff should go
// at a different offset: // at a different offset:
TIFFSetWriteOffset (out, exif_size+8); TIFFSetWriteOffset (out, exif_size+8);