avcodec/vlc: free multi on fail

Fixes: leak
Fixes: 62164/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_UTVIDEO_fuzzer-6449246523752448

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/390/head
Michael Niedermayer 1 year ago committed by Paul B Mahol
parent 2e04d35c69
commit 768704b640
  1. 1
      libavcodec/vlc.c

@ -481,6 +481,7 @@ int ff_vlc_init_multi_from_lengths(VLC *vlc, VLC_MULTI *multi, int nb_bits, int
fail:
if (buf != localbuf)
av_free(buf);
ff_vlc_free_multi(multi);
return AVERROR_INVALIDDATA;
}

Loading…
Cancel
Save