You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
avformat/rtpdec_latm: fix leak in parse_fmtp_config()
av_mallocz() allocates memory in config, but we forget to free it if init_get_bits() failed. Replace return ret with goto end. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
ba984355fe
commit
7ed5a7094f
@@ -104,7 +104,7 @@ static int parse_fmtp_config(AVStream *st, const char *value)
|
||||
ff_hex_to_data(config, value);
|
||||
ret = init_get_bits(&gb, config, len*8);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
goto end;
|
||||
audio_mux_version = get_bits(&gb, 1);
|
||||
same_time_framing = get_bits(&gb, 1);
|
||||
skip_bits(&gb, 6); /* num_sub_frames */
|
||||
|
Reference in New Issue
Block a user