free equipments, fewer leaks.

This commit is contained in:
Enno Rehling 2017-12-26 13:26:40 +01:00
parent 4397c67d1c
commit f4388f4429

View file

@ -292,7 +292,12 @@ static void free_equipment(equipment *eq) {
free(eq->items);
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) {
free(eq->skills[i]);
}