diff mbox series

[FFmpeg-devel,1/2] avcodec/hcadec: Fix memleak upon allocation error

Message ID AM7PR03MB66609A7789ED03B55E83D37C8F2D9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit 2c7f25d4608ba7d681b8f156dec75a5c60688be8
Headers show
Series [FFmpeg-devel,1/2] avcodec/hcadec: Fix memleak upon allocation error | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Feb. 8, 2022, 3:40 p.m. UTC
An AVFloatDSPContext would leak upon av_tx_init() failure.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/hcadec.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

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 },
 };