diff options
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r-- | libavformat/matroskaenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 06f3aeb..1c98c0d 100644 --- a/libavformat/matroskaenc.c +++ b/libavformat/matroskaenc.c @@ -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) { |