summaryrefslogtreecommitdiffstats
path: root/src/trie.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-12 13:18:00 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-12 13:20:27 -0400
commit1addab1e5f12cb0fddfa92872bf45653352cc212 (patch)
tree4c81c43119d568ac3a4539b87a00e17b0b9f57f3 /src/trie.c
parentda5c9dd34f65989c842cfb831b8592157dd8ed34 (diff)
downloadbfs-1addab1e5f12cb0fddfa92872bf45653352cc212.tar.xz
list: Assert that we're not inserting already-attached nodes
Diffstat (limited to 'src/trie.c')
-rw-r--r--src/trie.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/trie.c b/src/trie.c
index 55544e6..23b70ff 100644
--- a/src/trie.c
+++ b/src/trie.c
@@ -325,6 +325,7 @@ static struct trie_leaf *trie_leaf_alloc(struct trie *trie, const void *key, siz
return NULL;
}
+ LIST_ITEM_INIT(leaf);
LIST_APPEND(trie, leaf);
leaf->value = NULL;