From 84ff4d81581a1b5c785cb48933a35313d7137cf8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C5=82awomir=20Lach?= <slawek@lach.art.pl>
Date: Thu, 27 Oct 2022 15:50:36 +0200
Subject: [PATCH] =?UTF-8?q?!OSDN=20#TICKET:=2045911=20:=20S=C5=82awomir=20?=
 =?UTF-8?q?Lach=20<slawek@lach.art.pl>?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Program will more properly handles memory allocation
It will free countvaljes when needed.

diff --git a/server/savegame/savegame3.c b/server/savegame/savegame3.c
index dd662759e2..e12d6179b6 100644
--- a/server/savegame/savegame3.c
+++ b/server/savegame/savegame3.c
@@ -2691,6 +2691,8 @@ static void sg_save_counters(struct savedata *saving)
       ++j;
     } city_list_iterate_end;
   } players_iterate_end;
+
+  free(countvalues);
 }
 
 /* =======================================================================
-- 
2.38.0

