b4s: fix a potential memleak.
authorRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 12:55:37 +0000 (14:55 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Fri, 28 Aug 2009 12:55:37 +0000 (14:55 +0200)
modules/demux/playlist/b4s.c

index fdd69d2..0f5976e 100644 (file)
@@ -196,7 +196,12 @@ static int Demux( demux_t *p_demux )
                 {
                     char *psz_name = xml_ReaderName( p_xml_reader );
                     char *psz_value = xml_ReaderValue( p_xml_reader );
-                    if( !psz_name || !psz_value ) return -1;
+                    if( !psz_name || !psz_value )
+                    {
+                        free( psz_name );
+                        free( psz_value );
+                        return -1;
+                    }
                     if( !strcmp( psz_elname, "entry" ) &&
                         !strcmp( psz_name, "Playstring" ) )
                     {