From 339329449f4db72e4754f21c14295303ffe0ea5d Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 13 Apr 2013 10:37:27 +0000 Subject: Fix a memory management bug in Filling: in some situations its solve_game() was returning its aux parameter un-dupstr()ed, which is wrong. Also clarified the developer docs on that function to make it clearer that the returned string should be dynamic. [originally from svn r9831] --- filling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'filling.c') diff --git a/filling.c b/filling.c index 4cd4318..cad0733 100644 --- a/filling.c +++ b/filling.c @@ -975,7 +975,7 @@ static char *solve_game(game_state *state, game_state *currstate, if (!solver(state->board, w, h, &aux)) *error = "Sorry, I couldn't find a solution"; } - return aux; + return dupstr(aux); } /***************************************************************************** -- cgit v1.1