From 2c7f25d4608ba7d681b8f156dec75a5c60688be8 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Tue, 8 Feb 2022 15:21:54 +0100 Subject: [PATCH] avcodec/hcadec: Fix memleak upon allocation error An AVFloatDSPContext would leak upon av_tx_init() failure. Reviewed-by: Paul B Mahol Signed-off-by: Andreas Rheinhardt --- 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 }, };