isc_mem_put NULL's the pointer to the memory being freed. The
equality test 'parent->r == node' was accidentally being turned
into a test against NULL.
(cherry picked from commit
ac2e0bc3ff375807638cfd508f417a80290a37e8)
return;
}
- isc_mem_put(radix->mctx, node, sizeof(*node));
- radix->num_active_node--;
-
if (parent->r == node) {
parent->r = child;
} else {
INSIST(parent->l == node);
parent->l = child;
}
+
+ isc_mem_put(radix->mctx, node, sizeof(*node));
+ radix->num_active_node--;
}