[vlc-devel] commit: mp4: fix potential memleak. ( Rémi Duraffort )

git version control git at videolan.org
Sat Oct 10 11:57:45 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Oct  4 22:35:57 2009 +0200| [89031e12e0b49ba0b971865e67e49a993376133c] | committer: Rémi Duraffort 

mp4: fix potential memleak.

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

 modules/demux/mp4/mp4.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/modules/demux/mp4/mp4.c b/modules/demux/mp4/mp4.c
index 76aa37c..028f45b 100644
--- a/modules/demux/mp4/mp4.c
+++ b/modules/demux/mp4/mp4.c
@@ -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;




More information about the vlc-devel mailing list