From: Alan T. DeKok Date: Mon, 25 Mar 2019 19:05:15 +0000 (-0400) Subject: check node after inserting key, not before X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a146de586e005040fffdcb5ad80ee4ac8a3a91a;p=thirdparty%2Ffreeradius-server.git check node after inserting key, not before --- diff --git a/src/lib/util/trie.c b/src/lib/util/trie.c index 8741808cb93..80c669e21f2 100644 --- a/src/lib/util/trie.c +++ b/src/lib/util/trie.c @@ -1811,11 +1811,12 @@ static int fr_trie_comp_insert(TALLOC_CTX *ctx, fr_trie_t *parent, fr_trie_t **t comp->trie[i + 1] = comp->trie[i]; } - fr_trie_check((fr_trie_t *) comp, key, start_bit, end_bit, data, __LINE__); - MPRINT3("%.*scomp returning at %d", start_bit, spaces, __LINE__); comp->index[edge] = chunk; comp->trie[edge] = trie; + + fr_trie_check((fr_trie_t *) comp, key, start_bit, end_bit, data, __LINE__); + VERIFY(comp); return 0; }