avcodec/vlc: free multi on fail

Fixes: leak
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-6449246523752448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2023-09-20 02:30:33 +02:00 committed by Paul B Mahol
parent 2e04d35c69
commit 768704b640
1 changed files with 1 additions and 0 deletions

View File

@ -481,6 +481,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int
fail:
if (buf != localbuf)
av_free(buf);
ff_vlc_free_multi(multi);
return AVERROR_INVALIDDATA;
}