James H's memory leak fixes to Inertia.

[originally from svn r6255]
This commit is contained in:
Simon Tatham
2005-09-01 11:59:51 +00:00
parent 94b36c11e0
commit 04e26aaa7b

View File

@ -221,6 +221,9 @@ static struct solver_scratch *new_scratch(int w, int h)
static void free_scratch(struct solver_scratch *sc) static void free_scratch(struct solver_scratch *sc)
{ {
sfree(sc->reachable_from);
sfree(sc->reachable_to);
sfree(sc->positions);
sfree(sc); sfree(sc);
} }
@ -940,6 +943,8 @@ static game_drawstate *game_new_drawstate(drawing *dr, game_state *state)
static void game_free_drawstate(drawing *dr, game_drawstate *ds) static void game_free_drawstate(drawing *dr, game_drawstate *ds)
{ {
if (ds->player_background)
blitter_free(dr, ds->player_background);
sfree(ds->grid); sfree(ds->grid);
sfree(ds); sfree(ds);
} }