]> git.sesse.net Git - ffmpeg/commit
avcodec/avrndec: Fix memleak on error
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 13 Sep 2020 20:05:25 +0000 (22:05 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 15 Sep 2020 17:25:26 +0000 (19:25 +0200)
commit3c2128df7ffdb32a3ef34044f9a4c2f15dc1776f
tree87ec8e9593efbcd86e4c00a6cae76a29bad4e91c
parentd8e4d26de6a96ffd7813aad5bb0680b494192031
avcodec/avrndec: Fix memleak on error

If ff_codec_open2_recursive() fails, the already allocated
AVCodecContext leaks. Fix 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/avrndec.c