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

avcodec/vlc: Cleanup on multi table alloc failure in ff_vlc_init_multi_from_lengths()

Fixes: CID1544630 Resource leak

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 62d7106c36)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
Michael Niedermayer 2024-05-18 02:45:39 +02:00
parent 0241e87624
commit 47fd81fda3
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -458,7 +458,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int
multi->table = av_malloc(sizeof(*multi->table) << nb_bits);
if (!multi->table)
return AVERROR(ENOMEM);
goto fail;
j = code = 0;
for (int i = 0; i < nb_codes; i++, lens += lens_wrap) {