Summary: memory leak in server/ruleset.c :
Submitted by: None
Submitted on: Monday 02/08/2010 at 21:41 CET
Severity: 3 - Normal
Priority: 5 - Normal
Assigned to: None
Originator Email: jkl102...@yahoo.com
Discussion Lock: Any
Operating System: None
The variable csec is declared as a
struct section_list *
at line 986. Its value is set at line 1118 using the function
However, it is freed using plain free() on line 1485. The proper function
for freeing a struct section_list is called
which is defined via the speclist macro mechanism, so its definition does not
appear anywhere in the actual source code.
The impact of this bug is that internal data associated with the list is
never freed. Apparently it has existed since 2006.
The fix is to replace free() with section_list_free() on line 1485. Note the
'sec' variable, which has the same type as csec, is freed using the proper
function on the very next line.
Reply to this item at:
Message sent via/by Gna!
Freeciv-dev mailing list