fix a couple more obvious leaks

This commit is contained in:
DarthArgus
2015-04-02 23:32:51 -05:00
parent 3077d4be40
commit 4ff88606d8
2 changed files with 5 additions and 1 deletions
@@ -224,6 +224,9 @@ void DebugMonitor::install(void)
// NOTE: this can't go on the exit chain because the MemoryManager
// will write to it way late in processing.
//ExitChain::add(remove, "DebugMonitor");
fclose(s_ttyOutputFile);
fclose(s_ttyInputFile);
}
// ----------------------------------------------------------------------
@@ -1270,7 +1270,8 @@ bool TargaFormat::saveImage(const Image &image, const char *filename)
numWritten = fwrite(&footer, sizeof(footer), 1, f);
if (numWritten != 1)
{
DEBUG_WARNING(true, ("Targa footer not written successfully for %s\n", filename));
fclose(f);
DEBUG_WARNING(true, ("Targa footer not written successfully for %s\n", filename));
return false;
}
//------------------------------------------