Memory management and other fixes from James H.

[originally from svn r8596]
This commit is contained in:
Simon Tatham
2009-06-17 20:01:45 +00:00
parent 3cd83d05e8
commit 0687980f0c
9 changed files with 46 additions and 22 deletions

3
map.c
View File

@ -1373,6 +1373,7 @@ static int map_solver(struct solver_scratch *sc,
*/
}
sfree(origcolouring);
sfree(subcolouring);
free_scratch(rsc);
@ -1788,9 +1789,9 @@ static char *validate_desc(game_params *params, char *desc)
map = snewn(2*wh, int);
ret = parse_edge_list(params, &desc, map);
sfree(map);
if (ret)
return ret;
sfree(map);
if (*desc != ',')
return "Expected comma before clue list";