diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-03 21:35:13 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-03 21:35:13 +0100 |
commit | 7b22939c20afa4f4a08c13a25d71f2720f0b6a29 (patch) | |
tree | cca1ec10d242fcaca03104c0fc86656223d1bdb9 /trie.inc.h | |
parent | Update gitignore to contain parse and *.x. (diff) | |
download | calp-7b22939c20afa4f4a08c13a25d71f2720f0b6a29.tar.gz calp-7b22939c20afa4f4a08c13a25d71f2720f0b6a29.tar.xz |
Loads of memmory fixes, among other.
Diffstat (limited to 'trie.inc.h')
-rw-r--r-- | trie.inc.h | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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); } |