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

git version control git at videolan.org
Thu Mar 12 13:36:04 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Mar 10 14:59:55 2009 +0100| [ff865bf49e8dfd507dc9af6f49807c3c77b5b85f] | committer: Rémi Duraffort 

zipstream: fix potential memleak.

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

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

diff --git a/modules/access/zip/zipstream.c b/modules/access/zip/zipstream.c
index 9616f3e..c29d11f 100644
--- a/modules/access/zip/zipstream.c
+++ b/modules/access/zip/zipstream.c
@@ -424,7 +424,8 @@ static int GetFilesInZip( stream_t *p_this, unzFile file,
 
         if( !p_fileInfo || !psz_fileName )
         {
-            msg_Warn( p_this, "not enough memory" );
+            free( psz_fileName );
+            free( p_fileInfo );
             return VLC_ENOMEM;
         }
 




More information about the vlc-devel mailing list