mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-03 10:51:12 +02:00
fix possible Resource leak
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@249 e54a6e83-5905-42d5-8d5c-058d10e6a962
This commit is contained in:
@@ -176,6 +176,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
||||
if(filesize==0)
|
||||
{
|
||||
ErrorMessage = g_Locale->getText(LOCALE_FLASHUPDATE_FILEIS0BYTES);
|
||||
close(fd1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -187,6 +188,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
||||
//g_Zapit->shutdown(); sleep(2);
|
||||
if(!erase(globalProgressEndErase))
|
||||
{
|
||||
close(fd1);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -263,6 +265,7 @@ bool CFlashTool::erase(int globalProgressEnd)
|
||||
{
|
||||
// TODO: localize error message
|
||||
ErrorMessage = "can't get mtd-info";
|
||||
close(fd);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user