shithub: puzzles

Download patch

ref: 04e26aaa7b04af90d8d42e77d3d9ccc1dade678c
parent: 94b36c11e00bb740813506b0d3911f90f1829941
author: Simon Tatham <anakin@pobox.com>
date: Thu Sep 1 07:59:51 EDT 2005

James H's memory leak fixes to Inertia.

[originally from svn r6255]

--- a/inertia.c
+++ b/inertia.c
@@ -221,6 +221,9 @@
 
 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 void game_free_drawstate(drawing *dr, game_drawstate *ds)
 {
+    if (ds->player_background)
+	blitter_free(dr, ds->player_background);
     sfree(ds->grid);
     sfree(ds);
 }