]> git.sesse.net Git - ffmpeg/commit
avcodec/bink: Fix memleak upon init failure
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 4 Sep 2020 15:49:16 +0000 (17:49 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Fri, 4 Sep 2020 18:37:12 +0000 (20:37 +0200)
commit4f672889481e7b3dc03c04b02a86836e94104e63
tree93f6252da891d7c31b3ad4bf988df08f372431d1
parent912785572a77dc97d749e64a359e92c7d378ff4a
avcodec/bink: Fix memleak upon init failure

The init function first allocates an AVFrame and then some buffers; if
one of the buffers couldn't be allocated, the AVFrame leaks. Solve this
by setting the FF_CODEC_CAP_INIT_CLEANUP flag.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/bink.c