[vlc-commits] Fix potential file handler leak.

Rémi Duraffort git at videolan.org
Wed Aug 29 19:27:03 CEST 2012


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 29 19:11:11 2012 +0200| [a1dbddfa016acddef880829de54c67a10c3a730a] | committer: Rémi Duraffort

Fix potential file handler leak.

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

 modules/gui/skins2/src/theme_loader.cpp |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/gui/skins2/src/theme_loader.cpp b/modules/gui/skins2/src/theme_loader.cpp
index e2ef007..e224364 100644
--- a/modules/gui/skins2/src/theme_loader.cpp
+++ b/modules/gui/skins2/src/theme_loader.cpp
@@ -231,6 +231,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir,
             if( n < 0 )
             {
                 msg_Err( getIntf(), "error while reading zip file" );
+                fclose(fout);
                 free( pBuffer );
                 return false;
             }
@@ -240,6 +241,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir,
                 {
                     msg_Err( getIntf(), "error while writing %s",
                              fullPath.c_str() );
+                    fclose(fout);
                     free( pBuffer );
                     return false;
                 }



More information about the vlc-commits mailing list