mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +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 62d7106c36037d1bedd5a2e216540740f8f735eb) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
4bc1462acf
commit
23e3356b86
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user