mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-18 23:09:36 +08:00
rtemstoolkit: Various coverity related fixes.
This commit is contained in:
@@ -425,6 +425,7 @@ namespace rld
|
||||
archive (false),
|
||||
writable (false),
|
||||
elf_ (0),
|
||||
mtype (0),
|
||||
oclass (0),
|
||||
ident_str (0),
|
||||
ident_size (0),
|
||||
|
@@ -82,9 +82,15 @@ namespace rld
|
||||
}
|
||||
|
||||
temporary_files::~temporary_files ()
|
||||
{
|
||||
try
|
||||
{
|
||||
clean_up ();
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
const std::string
|
||||
temporary_files::get (const std::string& suffix, bool keep)
|
||||
@@ -99,6 +105,9 @@ namespace rld
|
||||
RLD_PATH_SEPARATOR_STR);
|
||||
tempfile_ref ref (name, keep);
|
||||
tempfiles.push_back (ref);
|
||||
|
||||
::free (temp);
|
||||
|
||||
return name;
|
||||
}
|
||||
|
||||
@@ -161,10 +170,16 @@ namespace rld
|
||||
}
|
||||
|
||||
tempfile::~tempfile ()
|
||||
{
|
||||
try
|
||||
{
|
||||
close ();
|
||||
temporaries.erase (_name);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
tempfile::open (bool writable)
|
||||
|
@@ -210,7 +210,6 @@ namespace rld
|
||||
if (slash == std::string::npos)
|
||||
throw rld::error ("Invalid BSP name", _arch_bsp);
|
||||
return _arch_bsp.substr (0, slash);
|
||||
std::string bsp = _arch_bsp.substr (slash + 1);
|
||||
}
|
||||
|
||||
const std::string
|
||||
|
Reference in New Issue
Block a user