From 6bba2a2ed7727a5f65ab2669c84f6fad58860efb Mon Sep 17 00:00:00 2001 From: Steffen Mecke Date: Tue, 16 Feb 2021 10:10:24 +0100 Subject: [PATCH] PR 929: fix memory leak --- src/laws.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/laws.c b/src/laws.c index 25ce5aeea..aadd4784b 100644 --- a/src/laws.c +++ b/src/laws.c @@ -1303,6 +1303,7 @@ static void remove_idle_players(void) i = turn + 1; if (i < 4) i = 4; + free(age); age = calloc(i, sizeof(int)); if (!age) abort(); for (fp = &factions; *fp;) {