forked from github/server
leaking loot from fighters after combat.
This commit is contained in:
parent
9ed93308ff
commit
357dd0ddca
1 changed files with 7 additions and 1 deletions
|
@ -3215,8 +3215,14 @@ free_side(side * si)
|
||||||
static void
|
static void
|
||||||
free_fighter(fighter * fig)
|
free_fighter(fighter * fig)
|
||||||
{
|
{
|
||||||
|
while (fig->loot) {
|
||||||
|
item * itm = fig->loot;
|
||||||
|
fig->loot = itm->next;
|
||||||
|
i_free(itm);
|
||||||
|
}
|
||||||
free(fig->person);
|
free(fig->person);
|
||||||
free(fig->weapons);
|
free(fig->weapons);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue