navigate march: Plug memory leaks
When the player aborts the command at the movement prompt, or declines to abandon a sector, unit_move() returns without freeing the list. Found with valgrind. Broken in commit24000b4
and commit7c1b166
, both v4.3.33. Free the list on these returns, too. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
25c7d3798b
commit
1abd3c5b0b
2 changed files with 14 additions and 3 deletions
|
@ -1013,6 +1013,8 @@
|
|||
Play#1 output Play#1 1 Leader is cav cavalry #78
|
||||
Play#1 output Play#1 4 Do you really want to abandon 3,7 [yn]?
|
||||
Play#1 input n
|
||||
Play#1 output Play#1 1 cav cavalry #78 stopped at 3,7
|
||||
Play#1 output Play#1 1 cav cavalry #79 stopped at 3,7
|
||||
Play#1 output Play#1 1 command failed
|
||||
Play#1 output Play#1 6 0 567
|
||||
Play#1 input march 84/83/80/81/82
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue