diff options
author | David Conrad <lessen42@gmail.com> | 2010-05-19 01:21:37 +0400 |
---|---|---|
committer | David Conrad <lessen42@gmail.com> | 2010-05-19 01:21:37 +0400 |
commit | 5549aa6d0d695b3563f068cae014a974aa013749 (patch) | |
tree | 0c3e6ed0c43ba884b232b50cc69e512cf5a39df2 /libavformat/matroskadec.c | |
parent | 465c28b6b43be2563e0b644ec22cf641fe374d8d (diff) |
matroskadec: Free ebml binary buffer on error
Based on a Chromium patch
Originally committed as revision 23169 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/matroskadec.c')
-rw-r--r-- | libavformat/matroskadec.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 9126717df2..1bde1af8c4 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -641,8 +641,10 @@ static int ebml_read_binary(ByteIOContext *pb, int length, EbmlBin *bin) 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; } |