]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check node after inserting key, not before
authorAlan T. DeKok <aland@freeradius.org>
Mon, 25 Mar 2019 19:05:15 +0000 (15:05 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 25 Mar 2019 19:05:15 +0000 (15:05 -0400)
src/lib/util/trie.c

index 8741808cb93681ffa489aefc6dddf1efd93b4cc9..80c669e21f254b017f4d22a27be263d99eece790 100644 (file)
@@ -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;
 }