From 85aed2e390799dc4037a6f0b95310dfda44fa6eb Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Mon, 30 Nov 2020 22:24:10 +0100 Subject: [PATCH] avcodec/binkaudio: Fix memleak upon init failure Signed-off-by: Andreas Rheinhardt --- libavcodec/binkaudio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/binkaudio.c b/libavcodec/binkaudio.c index 381fc4cd15..e0f12cefb1 100644 --- a/libavcodec/binkaudio.c +++ b/libavcodec/binkaudio.c @@ -345,6 +345,7 @@ AVCodec ff_binkaudio_rdft_decoder = { .close = decode_end, .receive_frame = binkaudio_receive_frame, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, }; AVCodec ff_binkaudio_dct_decoder = { @@ -357,4 +358,5 @@ AVCodec ff_binkaudio_dct_decoder = { .close = decode_end, .receive_frame = binkaudio_receive_frame, .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_DR1, + .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, };