[vlc-devel] [PATCH 2/2] MKV : Fix some memory leaks in the EBML parser.
Jai Menon
jmenon86 at gmail.com
Tue Jul 13 10:00:35 CEST 2010
---
modules/demux/mkv/Ebml_parser.cpp | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/modules/demux/mkv/Ebml_parser.cpp b/modules/demux/mkv/Ebml_parser.cpp
index 355f9e5..2858736 100644
--- a/modules/demux/mkv/Ebml_parser.cpp
+++ b/modules/demux/mkv/Ebml_parser.cpp
@@ -47,7 +47,12 @@ EbmlParser::EbmlParser( EbmlStream *es, EbmlElement *el_start, demux_t *p_demux
EbmlParser::~EbmlParser( void )
{
- for( int i = 1; i < mi_level; i++ )
+ if( !mi_level && m_el[1] )
+ {
+ delete m_el[1];
+ return;
+ }
+ for( int i = 1; i <= mi_level; i++ )
{
if( !mb_keep )
{
--
1.7.1.1
More information about the vlc-devel
mailing list