diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-06-27 04:30:20 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-08-24 11:28:10 +0200 |
commit | e7800543fe804dde114e4d86d7ab053a5b5516da (patch) | |
tree | 90e4da3b66cfd23e6f6036ef6f22805ec3dfbe17 | |
parent | fb1823e17807294ba0ab89b28f744ba73856009f (diff) | |
download | ffmpeg-e7800543fe804dde114e4d86d7ab053a5b5516da.tar.gz |
westwood_vqa: do not free extradata on error in read_header
The extradata is already freed by avformat_open_input on
failure.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 76f5dfbfd902178df4a38221a68dc8540189345a)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavformat/westwood_vqa.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c index 7c9cb0db81..77da375e70 100644 --- a/libavformat/westwood_vqa.c +++ b/libavformat/westwood_vqa.c @@ -106,7 +106,6 @@ static int wsvqa_read_header(AVFormatContext *s) header = (unsigned char *)st->codec->extradata; if (avio_read(pb, st->codec->extradata, VQA_HEADER_SIZE) != VQA_HEADER_SIZE) { - av_free(st->codec->extradata); return AVERROR(EIO); } st->codec->width = AV_RL16(&header[6]); @@ -132,7 +131,6 @@ static int wsvqa_read_header(AVFormatContext *s) * FINF has been skipped and the file will be ready to be demuxed */ do { if (avio_read(pb, scratch, VQA_PREAMBLE_SIZE) != VQA_PREAMBLE_SIZE) { - av_free(st->codec->extradata); return AVERROR(EIO); } chunk_tag = AV_RB32(&scratch[0]); |