From fffd46714f24e07b629c06d7b5c2b66cdf75b085 Mon Sep 17 00:00:00 2001 From: simon Date: Thu, 1 Sep 2005 11:59:51 +0000 Subject: [PATCH] James H's memory leak fixes to Inertia. git-svn-id: svn://svn.tartarus.org/sgt/puzzles@6255 cda61777-01e9-0310-a592-d414129be87e --- inertia.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/inertia.c b/inertia.c index fc213da..95bdcc8 100644 --- a/inertia.c +++ b/inertia.c @@ -221,6 +221,9 @@ static struct solver_scratch *new_scratch(int w, int h) static void free_scratch(struct solver_scratch *sc) { + sfree(sc->reachable_from); + sfree(sc->reachable_to); + sfree(sc->positions); 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) { + if (ds->player_background) + blitter_free(dr, ds->player_background); sfree(ds->grid); sfree(ds); } -- 2.11.0