Commit 76b9a096 authored by Michael Niedermayer's avatar Michael Niedermayer

riff: Fix freeing of random value.

Fixes Ticket752
Bug-found-by: Diana Elena Muscalu
parent 54c7e81a
...@@ -715,8 +715,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size) ...@@ -715,8 +715,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
AV_WL32(key, chunk_code); AV_WL32(key, chunk_code);
if (avio_read(pb, value, chunk_size) != chunk_size) { if (avio_read(pb, value, chunk_size) != chunk_size) {
av_freep(key); av_freep(&value);
av_freep(value);
av_log(s, AV_LOG_ERROR, "premature end of file while reading INFO tag\n"); av_log(s, AV_LOG_ERROR, "premature end of file while reading INFO tag\n");
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment