simon-git: puzzles (main): Ben Harris
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Mon Feb 13 11:26:56 GMT 2023
TL;DR:
19401e9 Don't leak duplicate edges in Untangle
1aa67e7 Remember to free the numcolours array from Pattern's drawstate
d577aae Free new game_state properly in Mosaic's execute_move()
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Ben Harris <bjh21 at bjh21.me.uk>
Date: 2023-02-13 11:26:56
commit 19401e95e0a75577103e9c1a877611234a0d8ab5
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=19401e95e0a75577103e9c1a877611234a0d8ab5;hp=0a7c531e8f4c1970662f7c30aea006e65d5ff010
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 13 11:08:14 2023 +0000
Don't leak duplicate edges in Untangle
Untangle game descriptions are allowed to contain duplicate edges, and
add234() can handle deduping them. However, when add234() reports that
your newly-allocated edge is a duplicate, it's important to free it
again.
untangle.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
commit 1aa67e7a75ac21d15780d6aaab65a2c0f6f65198
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=1aa67e7a75ac21d15780d6aaab65a2c0f6f65198;hp=19401e95e0a75577103e9c1a877611234a0d8ab5
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 13 11:13:03 2023 +0000
Remember to free the numcolours array from Pattern's drawstate
pattern.c | 1 +
1 file changed, 1 insertion(+)
commit d577aaecab09506988a657fa257c4d0ab85d0cd6
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=d577aaecab09506988a657fa257c4d0ab85d0cd6;hp=1aa67e7a75ac21d15780d6aaab65a2c0f6f65198
Author: Ben Harris <bjh21 at bjh21.me.uk>
Date: Mon Feb 13 11:21:11 2023 +0000
Free new game_state properly in Mosaic's execute_move()
Using sfree() rather than free_game() in the error paths meant that
various arrays referenced from the game_state weren't properly freed.
Also one error path didn't free the game_state at all.
mosaic.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
More information about the tartarus-commits
mailing list