forked from github/server
memory leak in equipment.skills
This commit is contained in:
parent
cb706c2cf2
commit
993af3a7f9
1 changed files with 5 additions and 1 deletions
|
@ -227,6 +227,7 @@ void equip_items(struct item **items, const struct equipment *eq)
|
|||
void equipment_done(void) {
|
||||
equipment **eqp = &equipment_sets;
|
||||
while (*eqp) {
|
||||
int i;
|
||||
equipment *eq = *eqp;
|
||||
*eqp = eq->next;
|
||||
free(eq->name);
|
||||
|
@ -240,7 +241,10 @@ void equipment_done(void) {
|
|||
free(eq->items);
|
||||
eq->items = next;
|
||||
}
|
||||
// TODO: subsets
|
||||
// TODO: subsets, skills
|
||||
for (i=0;i!=MAXSKILLS;++i) {
|
||||
free(eq->skills[i]);
|
||||
}
|
||||
free(eq);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue