[Freeciv-Dev] Re: (PR#6898) leaks in game_load / player_load
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=6898 >
On Tue, Nov 18, 2003 at 09:44:57AM -0800, Benoit Hudson wrote:
>
> <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.
hmm, that does seem bad. Can you think of a solution?
> It seems like allot_island_improvs isn't necessary, but it's not clear
> to me.
yeah, it's sorta important. see
common/improvement.c:improvement_redundant() and
server/maphand.c:check_for_continent_change()
> Similarly, player_load does ai_player_init which allocates an array that
> gets clobbered later (not sure when).
don't know about this one.
> 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.
yeah, but games can get loaded arbitrarily often...
-mike
- [Freeciv-Dev] Re: (PR#6898) leaks in game_load / player_load,
Mike Kaufman <=
|
|