From cb706c2cf2aeca9949b718de42e17a3e97d88339 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 7 Sep 2016 21:29:54 +0200 Subject: [PATCH] equipment.test is down to two leaks and one TODO --- src/kernel/equipment.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/kernel/equipment.c b/src/kernel/equipment.c index 5f1c31743..2debc9aa9 100644 --- a/src/kernel/equipment.c +++ b/src/kernel/equipment.c @@ -234,7 +234,13 @@ void equipment_done(void) { spellbook_clear(eq->spellbook); free(eq->spellbook); } - // TODO: items, subsets + while (eq->items) { + itemdata *next = eq->items->next; + free(eq->items->value); + free(eq->items); + eq->items = next; + } + // TODO: subsets free(eq); } }