[vlc-commits] Simplify

Rémi Denis-Courmont git at videolan.org
Sat Jan 22 09:28:48 CET 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 22 10:28:42 2011 +0200| [92864777b97fb1a6fb1f80c0d590fc4a1c869455] | committer: Rémi Denis-Courmont

Simplify

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

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

diff --git a/modules/misc/xml/libxml.c b/modules/misc/xml/libxml.c
index 7cd55a4..4fd6869 100644
--- a/modules/misc/xml/libxml.c
+++ b/modules/misc/xml/libxml.c
@@ -145,6 +145,9 @@ struct xml_reader_sys_t
 
 static int ReaderOpen( vlc_object_t *p_this )
 {
+    if( !xmlHasFeature( XML_WITH_THREAD ) )
+        return VLC_EGENERIC;
+
     xml_reader_t *p_reader = (xml_reader_t *)p_this;
     xml_reader_sys_t *p_sys = malloc( sizeof( *p_sys ) );
     xmlTextReaderPtr p_libxml_reader;
@@ -152,12 +155,6 @@ static int ReaderOpen( vlc_object_t *p_this )
     if( unlikely(!p_sys) )
         return VLC_ENOMEM;
 
-    if( !xmlHasFeature( XML_WITH_THREAD ) )
-    {
-        free( p_sys );
-        return VLC_EGENERIC;
-    }
-
     vlc_mutex_lock( &lock );
     xmlInitParser();
     vlc_mutex_unlock( &lock );



More information about the vlc-commits mailing list