From 1addab1e5f12cb0fddfa92872bf45653352cc212 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 12 Oct 2023 13:18:00 -0400 Subject: list: Assert that we're not inserting already-attached nodes --- src/trie.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/trie.c') 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; -- cgit v1.2.3