[vlc-commits] Fix potential file handler leak.

Rémi Duraffort git at videolan.org
Thu Aug 30 22:03:01 CEST 2012


vlc/vlc-2.0 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Wed Aug 29 19:11:11 2012 +0200| [d7567c3f13b2e2780eae1fb9cbd698fb1b92e547] | committer: Jean-Baptiste Kempf

Fix potential file handler leak.
(cherry picked from commit a1dbddfa016acddef880829de54c67a10c3a730a)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 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 e7825d0..144f489 100644
--- a/modules/gui/skins2/src/theme_loader.cpp
+++ b/modules/gui/skins2/src/theme_loader.cpp
@@ -235,6 +235,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;
             }
@@ -244,6 +245,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