mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +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
Origin commit data
------------------
Branch: ni/coolstream
Commit: f06a3982ef
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2010-02-01 (Mon, 01 Feb 2010)
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1187,6 +1187,7 @@ bool CFrameBuffer::loadPictureToMem(const std::string & filename, const uint16_t
|
|||||||
(height != ((header.height_hi << 8) | header.height_lo)))
|
(height != ((header.height_hi << 8) | header.height_lo)))
|
||||||
{
|
{
|
||||||
printf("error while loading icon: %s - invalid resolution = %hux%hu\n", filename.c_str(), width, height);
|
printf("error while loading icon: %s - invalid resolution = %hux%hu\n", filename.c_str(), width, height);
|
||||||
|
close(lfd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -99,6 +99,7 @@ int fh_bmp_load(const char *name,unsigned char **buffer,int* xp,int* yp)
|
|||||||
if(tbuffer==NULL)
|
if(tbuffer==NULL)
|
||||||
{
|
{
|
||||||
printf("Error: malloc\n");
|
printf("Error: malloc\n");
|
||||||
|
close(fd);
|
||||||
return (FH_ERROR_MALLOC);
|
return (FH_ERROR_MALLOC);
|
||||||
}
|
}
|
||||||
for (i=0; i<y; i++) {
|
for (i=0; i<y; i++) {
|
||||||
|
@@ -176,6 +176,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
|||||||
if(filesize==0)
|
if(filesize==0)
|
||||||
{
|
{
|
||||||
ErrorMessage = g_Locale->getText(LOCALE_FLASHUPDATE_FILEIS0BYTES);
|
ErrorMessage = g_Locale->getText(LOCALE_FLASHUPDATE_FILEIS0BYTES);
|
||||||
|
close(fd1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -187,6 +188,7 @@ bool CFlashTool::program( const std::string & filename, int globalProgressEndEra
|
|||||||
//g_Zapit->shutdown(); sleep(2);
|
//g_Zapit->shutdown(); sleep(2);
|
||||||
if(!erase(globalProgressEndErase))
|
if(!erase(globalProgressEndErase))
|
||||||
{
|
{
|
||||||
|
close(fd1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -263,6 +265,7 @@ bool CFlashTool::erase(int globalProgressEnd)
|
|||||||
{
|
{
|
||||||
// TODO: localize error message
|
// TODO: localize error message
|
||||||
ErrorMessage = "can't get mtd-info";
|
ErrorMessage = "can't get mtd-info";
|
||||||
|
close(fd);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user