Added comment

This commit is contained in:
Andrew Murray 2023-06-05 15:07:11 +10:00
parent e45da2ae17
commit 0835be95cb

View File

@ -720,9 +720,14 @@ ImagingLibTiffDecode(
}
decode_err:
// TIFFClose in libtiff calls tif_closeproc and TIFFCleanup
if (clientstate->fp) {
// Pillow will manage the closing of the file rather than libtiff
// So only call TIFFCleanup
TIFFCleanup(tiff);
} else {
// When tif_closeproc refers to our custom _tiffCloseProc though,
// that is fine, as it does not close the file
TIFFClose(tiff);
}
TRACE(("Done Decoding, Returning \n"));