From 984f18472ea4355ebe64513c711177fb2dacdd86 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 4 Sep 2022 04:22:39 +0300 Subject: [PATCH 59/59] Fix map_claim_base() memory leak See osdn #45545 Signed-off-by: Marko Lindqvist --- server/maphand.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/maphand.c b/server/maphand.c index 5f75bc3eef..7c61235920 100644 --- a/server/maphand.c +++ b/server/maphand.c @@ -2377,6 +2377,10 @@ void map_claim_base(struct tile *ptile, struct extra_type *pextra, i++; } unit_list_iterate_end; } + + if (could_see_unit != NULL) { + free(could_see_unit); + } } /**********************************************************************//** -- 2.35.1