summaryrefslogtreecommitdiff
path: root/wk5
diff options
context:
space:
mode:
Diffstat (limited to 'wk5')
-rw-r--r--wk5/pset/speller/dictionary.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/wk5/pset/speller/dictionary.c b/wk5/pset/speller/dictionary.c
index c25c02f..495383a 100644
--- a/wk5/pset/speller/dictionary.c
+++ b/wk5/pset/speller/dictionary.c
@@ -116,9 +116,12 @@ bool unload(void)
node *current = table(i);
while (current != NULL)
{
+ // record position of this node
+ node *this = current;
// record position of next node
current = current->next;
// free this node
+ free(this);
}
}
return false;