Commit 1ec777dc authored by Tristan Matthews's avatar Tristan Matthews Committed by James Almer

avformat/matroskaenc: fix leak on error

Signed-off-by: 's avatarJames Almer <jamrial@gmail.com>
parent d6a83922
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment