[vlc-commits] commit: MKV : Fix some memory leaks in the EBML parser. (Jai Menon )

git at videolan.org git at videolan.org
Sat Jul 17 14:28:33 CEST 2010


vlc/vlc-1.1 | branch: master | Jai Menon <jmenon86 at gmail.com> | Wed Jul 14 23:18:34 2010 +0530| [c2a9520c0eed55af1afba42e8653d5f21bf3c166] | committer: Jean-Baptiste Kempf 

MKV : Fix some memory leaks in the EBML parser.

Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=c2a9520c0eed55af1afba42e8653d5f21bf3c166
---

 modules/demux/mkv/Ebml_parser.cpp |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 5feafdf..590d09a 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -48,6 +48,12 @@ EbmlParser::EbmlParser( EbmlStream *es, EbmlElement *el_start, demux_t *p_demux
 
 EbmlParser::~EbmlParser( void )
 {
+    if( !mi_level )
+    {
+        delete m_el[1];
+        return;
+    }
+
     int i;
 
     for( i = 1; i < mi_level; i++ )



More information about the vlc-commits mailing list