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:
parent
0241e87624
commit
47fd81fda3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user