[FFmpeg-devel] [PATCH 17/30] avcodec/j2kenc: Fix leaks on init failure

Paul B Mahol onemda at gmail.com
Tue Sep 15 19:50:19 EEST 2020


On Tue, Sep 15, 2020 at 09:39:47AM +0200, Andreas Rheinhardt wrote:
> The JPEG2000 encoder did not clean up after itself on error.
> This commit fixes this by modifying the cleanup function to be able to
> handle only partially allocated structures and by setting the
> FF_CODEC_CAP_INIT_CLEANUP flag.
> 
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  libavcodec/j2kenc.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 

lgtm


More information about the ffmpeg-devel mailing list