simon-git: puzzles (main): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Thu Aug 24 12:53:49 BST 2023
TL;DR:
f279c5e midend_request_keys: fix memory leak of a game_params.
Repository: https://git.tartarus.org/simon/puzzles.git
On the web: https://git.tartarus.org/?p=simon/puzzles.git
Branch updated: main
Committer: Simon Tatham <anakin at pobox.com>
Date: 2023-08-24 12:53:49
commit f279c5eba035d018a8805a65a8a245b8b8d2ea2e
web diff https://git.tartarus.org/?p=simon/puzzles.git;a=commitdiff;h=f279c5eba035d018a8805a65a8a245b8b8d2ea2e;hp=56781e60ba88728f56bf0241a22553008d76ef74
Author: Simon Tatham <anakin at pobox.com>
Date: Thu Aug 24 12:40:51 2023 +0100
midend_request_keys: fix memory leak of a game_params.
Thanks to Steffen Bauer for spotting this. The call to
midend_get_params(me) was making a duplicate of me->params, and
nothing was freeing it.
Since the game_params is passed to request_keys as a const pointer, it
should be safe to pass me->params itself, so that instead of adding a
free, we can remove the unnecessary allocation.
midend.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the tartarus-commits
mailing list