Commit a1dbddfa authored by Rémi Duraffort's avatar Rémi Duraffort

Fix potential file handler leak.

parent 816e52c8
...@@ -231,6 +231,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir, ...@@ -231,6 +231,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;
} }
...@@ -240,6 +241,7 @@ bool ThemeLoader::extractFileInZip( unzFile file, const string &rootDir, ...@@ -240,6 +241,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