avcodec/jpeg2000dec: Free packed_headers

Fixes: memleak
Fixes: 21784/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-565256551058636

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Gautam Ramakrishnan <gautamramk@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/338/head
Michael Niedermayer 5 years ago
parent 1ead7ed5bf
commit ea29f07b2f
  1. 2
      libavcodec/jpeg2000dec.c

@ -2014,6 +2014,8 @@ static void jpeg2000_dec_cleanup(Jpeg2000DecoderContext *s)
ff_jpeg2000_cleanup(comp, codsty); ff_jpeg2000_cleanup(comp, codsty);
} }
av_freep(&s->tile[tileno].comp); av_freep(&s->tile[tileno].comp);
av_freep(&s->tile[tileno].packed_headers);
s->tile[tileno].packed_headers_size = 0;
} }
} }
av_freep(&s->tile); av_freep(&s->tile);

Loading…
Cancel
Save