1
0

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>
This commit is contained in:
Michael Niedermayer 2024-05-18 02:45:39 +02:00
parent d5cc21741b
commit 62d7106c36
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64

View File

@ -529,7 +529,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) {