changeset 6018:b36bdd7213ea libavformat

matroskadec: Free ebml binary buffer on error Based on a Chromium patch
author conrad
date Tue, 18 May 2010 21:21:37 +0000
parents 9565f0ce6f2e
children 76a20c880f08
files matroskadec.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/matroskadec.c	Tue May 18 21:21:32 2010 +0000
+++ b/matroskadec.c	Tue May 18 21:21:37 2010 +0000
@@ -641,8 +641,10 @@
 
     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;
 }