1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-08 13:22:53 +02:00

avcodec/aac/aacdec: Free channel layout

Fixes: 371445194/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_LATM_fuzzer-5981081124274176
Fixes: memleak

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-12-24 21:30:32 +01:00
parent d1d9b0813a
commit ae81beb351
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -1104,6 +1104,8 @@ static av_cold int decode_close(AVCodecContext *avctx)
for (int i = 0; i < 2; i++) {
OutputConfiguration *oc = &ac->oc[i];
av_channel_layout_uninit(&ac->oc[i].ch_layout);
AACUSACConfig *usac = &oc->usac;
for (int j = 0; j < usac->nb_elems; j++) {
AACUsacElemConfig *ec = &usac->elems[j];