fix memory leak if loading is failed

This commit is contained in:
Alexander 2017-05-22 19:38:57 +03:00
parent a26a584812
commit 873d9ec089

View File

@ -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;
}