[vlc-commits] commit: Fixed order between xmlFreeTextReader and xmlCleanupParser. ( Laurent Aimar )

git at videolan.org git at videolan.org
Tue Aug 17 23:38:06 CEST 2010


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Tue Aug 17 23:30:04 2010 +0200| [134f4a7b08d5fbbd0e645690e7d170b090caa6e5] | committer: Laurent Aimar 

Fixed order between xmlFreeTextReader and xmlCleanupParser.

 I am not sure it had consequences, but it seems more logical and
it follows the libxml2 code example I found (reader1.c).

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

 modules/misc/xml/libxml.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index d448cfc..47b1f78 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -179,12 +179,12 @@ static void ReaderClose( vlc_object_t *p_this )
 {
     xml_reader_t *p_reader = (xml_reader_t *)p_this;
 
+    xmlFreeTextReader( (void *)p_reader->p_sys );
 #ifdef LIBXML_GETS_A_CLUE_ABOUT_REENTRANCY_AND_MEMORY_LEAKS
     vlc_mutex_lock( &lock );
     xmlCleanupParser();
     vlc_mutex_unlock( &lock );
 #endif
-    xmlFreeTextReader( (void *)p_reader->p_sys );
 }
 
 static int ReaderUseDTD ( xml_reader_t *p_reader )



More information about the vlc-commits mailing list