diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-18 02:45:39 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-05-28 03:48:08 +0200 |
commit | 62d7106c36037d1bedd5a2e216540740f8f735eb (patch) | |
tree | 53d2690ba360ea1137ab8040db492c6e7bd3ffd9 /libavcodec | |
parent | d5cc21741b9c2c28f8436f0a1e27687794d63ab1 (diff) | |
download | ffmpeg-62d7106c36037d1bedd5a2e216540740f8f735eb.tar.gz |
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>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/vlc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/vlc.c b/libavcodec/vlc.c index ee09d96fd6..f46ecbb55e 100644 --- a/libavcodec/vlc.c +++ b/libavcodec/vlc.c @@ -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) { |