Use a dedicated free function to free dsfs.

No functional change: currently, this just wraps the previous sfree
call.
This commit is contained in:
Simon Tatham
2023-04-20 13:35:58 +01:00
parent 16f997d34c
commit bb561ee3b1
24 changed files with 70 additions and 64 deletions

View File

@ -1817,7 +1817,7 @@ static solver_ctx *new_solver(game_state *state)
static void free_solver(solver_ctx *sctx)
{
sfree(sctx->scratch);
sfree(sctx->dsf);
dsf_free(sctx->dsf);
sfree(sctx->iscratch);
sfree(sctx);
}
@ -3240,7 +3240,7 @@ static bool check_complete(const game_state *state, int *dsf, int *colours)
sfree(sqdata);
if (free_dsf)
sfree(dsf);
dsf_free(dsf);
return ret;
}
@ -4095,7 +4095,7 @@ static void game_print(drawing *dr, const game_state *state, int sz)
black : white), black);
}
sfree(dsf);
dsf_free(dsf);
sfree(colours);
sfree(coords);
}