PR 929: fix memory leak

This commit is contained in:
Steffen Mecke 2021-02-16 10:10:24 +01:00 committed by Enno Rehling
parent 219ec117c6
commit 6bba2a2ed7
1 changed files with 1 additions and 0 deletions

View File

@ -1303,6 +1303,7 @@ static void remove_idle_players(void)
i = turn + 1; i = turn + 1;
if (i < 4) i = 4; if (i < 4) i = 4;
free(age);
age = calloc(i, sizeof(int)); age = calloc(i, sizeof(int));
if (!age) abort(); if (!age) abort();
for (fp = &factions; *fp;) { for (fp = &factions; *fp;) {