diff --git a/libImaging/ZipDecode.c b/libImaging/ZipDecode.c index 37cb2866c..2f6cdce34 100644 --- a/libImaging/ZipDecode.c +++ b/libImaging/ZipDecode.c @@ -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; }