chiark / gitweb /
Fix a memory leak in Range's find_errors.
authorJonas Kölker <jonaskoelker@yahoo.com>
Mon, 21 Sep 2015 14:21:48 +0000 (16:21 +0200)
committerSimon Tatham <anakin@pobox.com>
Sat, 3 Oct 2015 15:58:05 +0000 (16:58 +0100)
Only occurred in invalid instances, such as 3x1:1b when you put a
black in the middle square.

range.c

diff --git a/range.c b/range.c
index dc847a42d9c0663fabc96906fd2352eadf416a5d..4347f7697d1c25f84ca0d3322ffe49e57c35c7e2 100644 (file)
--- a/range.c
+++ b/range.c
@@ -1451,7 +1451,7 @@ static int find_errors(const game_state *state, int *report)
         int biggest, canonical;
 
         if (!report) {
-            printf("dfs fail at %d\n", any_white_cell);
+            sfree(dsf);
             goto found_error;
         }