Removed several memory leaks.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5595 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-03-10 21:46:09 +00:00
parent 4c36a39814
commit 84d90343ea
5 changed files with 45 additions and 7 deletions

View File

@@ -81,7 +81,8 @@ void FreeBitmap (Bitmap* B)
{
/* Alloc NULL pointers */
if (B != 0) {
/* Free the palette and then the bitmap */
/* Free name, palette and then the bitmap */
SB_Done (&B->Name);
xfree (B->Pal);
xfree(B);
}
@@ -190,7 +191,7 @@ unsigned GetBitmapColors (const Bitmap* B)
case bmRGB:
case bmRGBA: return (1U << 24);
default: Internal ("Unknown bitmap type %u", B->Type);
}
}
/* NOTREACHED */
return 0;
}