mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-27 01:01:07 +00:00
avformat/pcmdec: fix memory leak
Fixes CID 1396267
This commit is contained in:
parent
4b2a2969f3
commit
a5b5ce2658
@ -68,6 +68,7 @@ static int pcm_read_header(AVFormatContext *s)
|
|||||||
av_log(s, AV_LOG_ERROR,
|
av_log(s, AV_LOG_ERROR,
|
||||||
"Invalid sample_rate found in mime_type \"%s\"\n",
|
"Invalid sample_rate found in mime_type \"%s\"\n",
|
||||||
mime_type);
|
mime_type);
|
||||||
|
av_freep(&mime_type);
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
}
|
}
|
||||||
st->codecpar->sample_rate = rate;
|
st->codecpar->sample_rate = rate;
|
||||||
@ -75,6 +76,7 @@ static int pcm_read_header(AVFormatContext *s)
|
|||||||
st->codecpar->channels = channels;
|
st->codecpar->channels = channels;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
av_freep(&mime_type);
|
||||||
|
|
||||||
st->codecpar->bits_per_coded_sample =
|
st->codecpar->bits_per_coded_sample =
|
||||||
av_get_bits_per_sample(st->codecpar->codec_id);
|
av_get_bits_per_sample(st->codecpar->codec_id);
|
||||||
|
Loading…
Reference in New Issue
Block a user