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