Module: libav
Branch: release/0.8
Commit: 26589aa81028f42c763c5581a1486a271799890b

Author:    Luca Barbato <[email protected]>
Committer: Luca Barbato <[email protected]>
Date:      Thu Jun 27 04:30:20 2013 +0200

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: [email protected]
(cherry picked from commit 76f5dfbfd902178df4a38221a68dc8540189345a)

Signed-off-by: Luca Barbato <[email protected]>

---

 libavformat/westwood.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libavformat/westwood.c b/libavformat/westwood.c
index 82b7e94..47e835a 100644
--- a/libavformat/westwood.c
+++ b/libavformat/westwood.c
@@ -240,7 +240,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]);
@@ -279,7 +278,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]);

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to