mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-14 11:00:08 +01:00
avformat/matroskaenc: fix leak on error
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 1ec777dcdd)
This commit is contained in:
committed by
James Almer
parent
420fe39aff
commit
cf7a5c655c
@@ -694,8 +694,10 @@ static int put_flac_codecpriv(AVFormatContext *s,
|
|||||||
av_dict_set(&dict, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
|
av_dict_set(&dict, "WAVEFORMATEXTENSIBLE_CHANNEL_MASK", buf, 0);
|
||||||
|
|
||||||
len = ff_vorbiscomment_length(dict, vendor);
|
len = ff_vorbiscomment_length(dict, vendor);
|
||||||
if (len >= ((1<<24) - 4))
|
if (len >= ((1<<24) - 4)) {
|
||||||
|
av_dict_free(&dict);
|
||||||
return AVERROR(EINVAL);
|
return AVERROR(EINVAL);
|
||||||
|
}
|
||||||
|
|
||||||
data = av_malloc(len + 4);
|
data = av_malloc(len + 4);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user