[vlc-devel] commit: Zip: fix use after free error. ( Rémi Duraffort )

git version control git at videolan.org
Tue Jul 28 11:44:37 CEST 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Jul 28 11:42:10 2009 +0200| [56dc82edfd2457c6b8a0f3596f62d3664a2385fe] | committer: Rémi Duraffort 

Zip: fix use after free error.

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

 modules/access/zip/zipstream.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index 0250312..59b3f74 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -205,8 +205,8 @@ int StreamOpen( vlc_object_t *p_this )
     if( !p_sys->zipFile )
     {
         msg_Warn( s, "unable to open file" );
-        free( p_sys );
         free( p_sys->fileFunctions );
+        free( p_sys );
         return VLC_EGENERIC;
     }
 
@@ -214,8 +214,8 @@ int StreamOpen( vlc_object_t *p_this )
     char *psz_tmp;
     if( asprintf( &psz_tmp, "%s.xspf", s->psz_path ) == -1 )
     {
-        free( p_sys );
         free( p_sys->fileFunctions );
+        free( p_sys );
         return VLC_ENOMEM;
     }
     p_sys->psz_path = s->psz_path;




More information about the vlc-devel mailing list