mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 10:26:19 +03:00
fix memory leak if loading is failed
This commit is contained in:
parent
a26a584812
commit
873d9ec089
|
@ -85,6 +85,7 @@ ImagingZipDecode(Imaging im, ImagingCodecState state, UINT8* buf, int bytes)
|
|||
err = inflateInit(&context->z_stream);
|
||||
if (err < 0) {
|
||||
state->errcode = IMAGING_CODEC_CONFIG;
|
||||
free(context->previous);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user