[FFmpeg-cvslog] avcodec/hcadec: Fix memleak upon allocation error

Andreas Rheinhardt git at videolan.org
Wed Feb 9 08:06:59 EET 2022


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Tue Feb  8 15:21:54 2022 +0100| [2c7f25d4608ba7d681b8f156dec75a5c60688be8] | committer: Andreas Rheinhardt

avcodec/hcadec: Fix memleak upon allocation error

An AVFloatDSPContext would leak upon av_tx_init() failure.

Reviewed-by: Paul B Mahol <onemda at gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2c7f25d4608ba7d681b8f156dec75a5c60688be8
---

 libavcodec/hcadec.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/hcadec.c b/libavcodec/hcadec.c
index c98f8eb379..ef3af08c4c 100644
--- a/libavcodec/hcadec.c
+++ b/libavcodec/hcadec.c
@@ -455,6 +455,7 @@ const AVCodec ff_hca_decoder = {
     .decode         = decode_frame,
     .close          = decode_close,
     .capabilities   = AV_CODEC_CAP_DR1,
+    .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
     .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
                                                       AV_SAMPLE_FMT_NONE },
 };



More information about the ffmpeg-cvslog mailing list