aboutsummaryrefslogtreecommitdiff
path: root/solo.c
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2023-06-06 18:50:38 +0100
committerSimon Tatham <anakin@pobox.com>2023-06-06 19:54:40 +0100
commit7333d27b0c9d85d7fec41c2ca60dbea740767451 (patch)
tree2240638f083cbfb0ce52cf90ed225b16cfe72f91 /solo.c
parent4227ac1fd5dc25c247e7526526079b85e1890766 (diff)
downloadpuzzles-7333d27b0c9d85d7fec41c2ca60dbea740767451.zip
puzzles-7333d27b0c9d85d7fec41c2ca60dbea740767451.tar.gz
puzzles-7333d27b0c9d85d7fec41c2ca60dbea740767451.tar.bz2
puzzles-7333d27b0c9d85d7fec41c2ca60dbea740767451.tar.xz
Fix a few minor memory leaks.
Thanks to Jeremy Stephens for reporting them.
Diffstat (limited to 'solo.c')
-rw-r--r--solo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/solo.c b/solo.c
index 27ac7c9..2cfa0f3 100644
--- a/solo.c
+++ b/solo.c
@@ -2642,6 +2642,7 @@ static void solver(int cr, struct block_structure *blocks,
sfree(usage->row);
sfree(usage->col);
sfree(usage->blk);
+ sfree(usage->diag);
if (usage->kblocks) {
free_block_structure(usage->kblocks);
free_block_structure(usage->extra_cages);
@@ -2973,6 +2974,7 @@ static bool gridgen(int cr, struct block_structure *blocks,
sfree(usage->blk);
sfree(usage->col);
sfree(usage->row);
+ sfree(usage->diag);
sfree(usage);
return ret;