riff: fix invalid av_freep() calls on EOF in ff_read_riff_info
authorJanne Grunau <janne-libav@jannau.net>
Thu, 5 Jan 2012 19:15:53 +0000 (20:15 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Sun, 22 Jan 2012 18:32:44 +0000 (19:32 +0100)
libavformat/riff.c

index 4caac80..99a8033 100644 (file)
@@ -669,8 +669,7 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
         AV_WL32(key, chunk_code);
 
         if (avio_read(pb, value, chunk_size) != chunk_size) {
-            av_freep(key);
-            av_freep(value);
+            av_free(value);
             av_log(s, AV_LOG_ERROR, "premature end of file while reading INFO tag\n");
             return AVERROR_INVALIDDATA;
         }