forked from github/server
free equipments, fewer leaks.
This commit is contained in:
parent
4397c67d1c
commit
f4388f4429
1 changed files with 6 additions and 1 deletions
|
@ -292,7 +292,12 @@ static void free_equipment(equipment *eq) {
|
||||||
free(eq->items);
|
free(eq->items);
|
||||||
eq->items = next;
|
eq->items = next;
|
||||||
}
|
}
|
||||||
/* TODO: subsets, skills */
|
if (eq->subsets) {
|
||||||
|
for (i = 0; eq->subsets[i].sets; ++i) {
|
||||||
|
free(eq->subsets[i].sets);
|
||||||
|
}
|
||||||
|
free(eq->subsets);
|
||||||
|
}
|
||||||
for (i = 0; i != MAXSKILLS; ++i) {
|
for (i = 0; i != MAXSKILLS; ++i) {
|
||||||
free(eq->skills[i]);
|
free(eq->skills[i]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue