From e8ad5424307862b4a01f1ea723a66d62ebe91b1e Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 31 Dec 2014 01:50:54 +0100 Subject: [PATCH] more thorough cleanup of tokens. --- src/util/umlaut.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/util/umlaut.c b/src/util/umlaut.c index 6917960cc..c7072987c 100644 --- a/src/util/umlaut.c +++ b/src/util/umlaut.c @@ -211,8 +211,13 @@ void freetokens(void * root) int i; for (i = 0; node && i != NODEHASHSIZE; ++i) { if (node->next[i]) { + tref ** refs = &node->next[i]; freetokens(node->next[i]->node); - free(node->next[i]); + while (*refs) { + tref * ref = *refs; + *refs = ref->nexthash; + free(ref); + } } } free(node);