From: Alan T. DeKok Date: Mon, 1 Oct 2018 13:17:16 +0000 (-0400) Subject: reset "chunk" to ensure we find the correct entry X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10c292bc998654e4a54645c3fca1a2cbbb65cd85;p=thirdparty%2Ffreeradius-server.git reset "chunk" to ensure we find the correct entry --- diff --git a/src/lib/util/trie.c b/src/lib/util/trie.c index 3465caf6863..a9d570fe1dc 100644 --- a/src/lib/util/trie.c +++ b/src/lib/util/trie.c @@ -1756,6 +1756,7 @@ static void *fr_trie_key_remove(fr_trie_t *ft, TALLOC_CTX *ctx, void **parent_p, if (node->used == 1) { int i; void *trie; + chunk = -1; for (i = 0; i < (1 << node->size); i++) { if (node->trie[i]) { @@ -1765,6 +1766,8 @@ static void *fr_trie_key_remove(fr_trie_t *ft, TALLOC_CTX *ctx, void **parent_p, } fr_cond_assert(i < (1 << node->size)); + fr_cond_assert(chunk >= 0); + fr_cond_assert(chunk < (1 << node->size)); /* * Convert the node to a PATH.