mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-02 19:03:24 +03:00
Fix libtiff cleanup (#9002)
This commit is contained in:
parent
129267bc82
commit
acd8b0c2ac
|
@ -1032,7 +1032,10 @@ ImagingLibTiffEncode(Imaging im, ImagingCodecState state, UINT8 *buffer, int byt
|
|||
TRACE(("Encode Error, row %d\n", state->y));
|
||||
state->errcode = IMAGING_CODEC_BROKEN;
|
||||
|
||||
if (!clientstate->fp) {
|
||||
if (clientstate->fp) {
|
||||
TIFFCleanup(tiff);
|
||||
clientstate->tiff = NULL;
|
||||
} else {
|
||||
free(clientstate->data);
|
||||
}
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue
Block a user