]> git.sesse.net Git - vlc/commitdiff
Fixed small memory leaks.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 24 Mar 2007 01:18:53 +0000 (01:18 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 24 Mar 2007 01:18:53 +0000 (01:18 +0000)
modules/demux/playlist/pls.c

index b3df8e2d8ccff1eb8b4d9c2d37f494a3e0eae9f3..ed0c3b0ed9dc3c21340ee8cf1fac6aa2b3ab56d8 100644 (file)
@@ -181,6 +181,8 @@ static int Demux( demux_t *p_demux )
         if( !strncasecmp( psz_key, "file", sizeof("file") -1 ) ||
             !strncasecmp( psz_key, "Ref", sizeof("Ref") -1 ) )
         {
+            if( psz_mrl_orig )
+                free( psz_mrl_orig );
             psz_mrl_orig =
             psz_mrl = E_(ProcessMRL)( psz_value, p_demux->p_sys->psz_prefix );
 
@@ -197,6 +199,8 @@ static int Demux( demux_t *p_demux )
         }
         else if( !strncasecmp( psz_key, "title", sizeof("title") -1 ) )
         {
+            if( psz_name )
+                free( psz_name );
             psz_name = strdup( psz_value );
         }
         else if( !strncasecmp( psz_key, "length", sizeof("length") -1 ) )