mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Added the JPEG2000 memory leak fix to decode.c
This commit is contained in:
parent
5ca57520b6
commit
3acb06e9d2
2
decode.c
2
decode.c
|
@ -103,6 +103,8 @@ PyImaging_DecoderNew(int contextsize)
|
||||||
static void
|
static void
|
||||||
_dealloc(ImagingDecoderObject* decoder)
|
_dealloc(ImagingDecoderObject* decoder)
|
||||||
{
|
{
|
||||||
|
if (decoder->cleanup)
|
||||||
|
decoder->cleanup(&decoder->state);
|
||||||
free(decoder->state.buffer);
|
free(decoder->state.buffer);
|
||||||
free(decoder->state.context);
|
free(decoder->state.context);
|
||||||
Py_XDECREF(decoder->lock);
|
Py_XDECREF(decoder->lock);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user