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
@@ -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;
}
//------------------------------------------