1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00

avformat/matroskaenc: fix leak on error

Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
Tristan Matthews 2019-04-04 12:56:26 -04:00 committed by James Almer
parent d6a8392224
commit 1ec777dcdd

@ -694,8 +694,10 @@ static int put_flac_codecpriv(AVFormatContext *s,
av_dict_set(&dict, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
len = ff_vorbiscomment_length(dict, vendor, NULL, 0);
if (len >= ((1<<24) - 4))
if (len >= ((1<<24) - 4)) {
av_dict_free(&dict);
return AVERROR(EINVAL);
}
data = av_malloc(len + 4);
if (!data) {