Commit d7567c3f authored by Rémi Duraffort's avatar Rémi Duraffort Committed by Jean-Baptiste Kempf

Fix potential file handler leak.

(cherry picked from commit a1dbddfa)
Signed-off-by: default avatarJean-Baptiste Kempf <jb@videolan.org>
parent 84f41b3a
...@@ -235,6 +235,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir, ...@@ -235,6 +235,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir,
if( n < 0 ) if( n < 0 )
{ {
msg_Err( getIntf(), "error while reading zip file" ); msg_Err( getIntf(), "error while reading zip file" );
fclose(fout);
free( pBuffer ); free( pBuffer );
return false; return false;
} }
...@@ -244,6 +245,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir, ...@@ -244,6 +245,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir,
{ {
msg_Err( getIntf(), "error while writing %s", msg_Err( getIntf(), "error while writing %s",
fullPath.c_str() ); fullPath.c_str() );
fclose(fout);
free( pBuffer ); free( pBuffer );
return false; return false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment