]> git.sesse.net Git - vlc/commitdiff
mp4: fix potential memleak.
authorRémi Duraffort <ivoire@videolan.org>
Sun, 4 Oct 2009 20:35:57 +0000 (22:35 +0200)
committerRémi Duraffort <ivoire@videolan.org>
Sat, 10 Oct 2009 09:26:48 +0000 (11:26 +0200)
modules/demux/mp4/mp4.c

index 76aa37c06d37e4aa1125ccdd32ce09f337eac28c..028f45b253ed0499240cc70b0614c2a4d739599d 100644 (file)
@@ -405,7 +405,11 @@ static int Open( vlc_object_t * p_this )
 
                     if( asprintf( &psz_absolute, "%s://%s%s",
                                   p_demux->psz_access, psz_path, psz_ref ) < 0 )
+                    {
+                        free( psz_ref );
+                        free( psz_path );
                         return VLC_ENOMEM;
+                    }
 
                     free( psz_ref );
                     psz_ref = psz_absolute;