Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2003:
[Freeciv-Dev] (PR#6898) leaks in game_load / player_load
Home

[Freeciv-Dev] (PR#6898) leaks in game_load / player_load

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#6898) leaks in game_load / player_load
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 18 Nov 2003 09:44:57 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=6898 >

game_load does allot_island_improvs and then calls player_load.  In
turn, player_load does player_init.  Finally, player_init clobbers an
array that allot_island_improvs allocated, resulting in a memory leak.

It seems like allot_island_improvs isn't necessary, but it's not clear
to me.

Similarly, player_load does ai_player_init which allocates an array that
gets clobbered later (not sure when).

Neither of these leaks are much to worry about: ~10 kb for loading a
game with a moderate number of players and cities.  So it may not be
worth caring about these two leaks.


[Prev in Thread] Current Thread [Next in Thread]