[FFmpeg-cvslog] r23169 - trunk/libavformat/matroskadec.c

conrad subversion
Tue May 18 23:21:37 CEST 2010


Author: conrad
Date: Tue May 18 23:21:37 2010
New Revision: 23169

Log:
matroskadec: Free ebml binary buffer on error

Based on a Chromium patch

Modified:
   trunk/libavformat/matroskadec.c

Modified: trunk/libavformat/matroskadec.c
==============================================================================
--- trunk/libavformat/matroskadec.c	Tue May 18 23:21:32 2010	(r23168)
+++ trunk/libavformat/matroskadec.c	Tue May 18 23:21:37 2010	(r23169)
@@ -641,8 +641,10 @@ static int ebml_read_binary(ByteIOContex
 
     bin->size = length;
     bin->pos  = url_ftell(pb);
-    if (get_buffer(pb, bin->data, length) != length)
+    if (get_buffer(pb, bin->data, length) != length) {
+        av_freep(&bin->data);
         return AVERROR(EIO);
+    }
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list