From 7b22939c20afa4f4a08c13a25d71f2720f0b6a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 3 Feb 2019 21:35:13 +0100 Subject: Loads of memmory fixes, among other. --- trie.inc.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'trie.inc.h') diff --git a/trie.inc.h b/trie.inc.h index 316b54b2..b839a7e8 100644 --- a/trie.inc.h +++ b/trie.inc.h @@ -107,6 +107,10 @@ int TRIE_NODE_FREE(TYPE) ( TRIE_NODE(TYPE)* node ) { } int TRIE_FREE(TYPE) ( TRIE(TYPE)* trie ) { + if (trie->root->c != '\0') { + // ERR("Invalid trie"); + return 1; + } return TRIE_NODE_FREE(TYPE)(trie->root); } -- cgit v1.2.3