aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-06-21 00:47:19 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2019-12-02 19:41:48 +0100
commitfa89d0ec88e202a4ca29790dd168319ebbb90268 (patch)
tree398646a53997782b6d2748cfd3ff31da60f8bf29
parent4e2bf59270b00822221cb16c9a7b1df6eade5502 (diff)
downloadffmpeg-fa89d0ec88e202a4ca29790dd168319ebbb90268.tar.gz
avcodec/alsdec: Add FF_CODEC_CAP_INIT_CLEANUP
Fixes: multiple memleaks Fixes: 15293/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-5642409288925184 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit b7b6ddd59693008c35b3247496ecc946331d0856) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/alsdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/alsdec.c b/libavcodec/alsdec.c
index 93ee13e21d..d7149e51b7 100644
--- a/libavcodec/alsdec.c
+++ b/libavcodec/alsdec.c
@@ -1841,7 +1841,6 @@ static av_cold int decode_init(AVCodecContext *avctx)
return 0;
fail:
- decode_end(avctx);
return ret;
}
@@ -1867,4 +1866,5 @@ AVCodec ff_als_decoder = {
.decode = decode_frame,
.flush = flush,
.capabilities = AV_CODEC_CAP_SUBFRAMES | AV_CODEC_CAP_DR1,
+ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
};