diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 460a4ad95c..65555424ed 100644 --- a/libavcodec/jpeg2000dec.c +++ b/libavcodec/jpeg2000dec.c @@ -2014,6 +2014,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s) ff_jpeg2000_cleanup(comp, codsty); } av_freep(&s->tile[tileno].comp); + av_freep(&s->tile[tileno].packed_headers); + s->tile[tileno].packed_headers_size = 0; } } av_freep(&s->tile);