X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/94a4dc1c0be8c17882f278c079bc3fd23a824fb5..77ada3cbf5bc043e552d4302f385a28d7f401862:/patricia/patricia.c diff --git a/patricia/patricia.c b/patricia/patricia.c index 2f0e510d..7928c782 100644 --- a/patricia/patricia.c +++ b/patricia/patricia.c @@ -124,15 +124,9 @@ void releasenodeext(int index) { PATRICIA_WALK_CLEAR(head, node) { if ( node->exts[index] ) { - if (node->prefix) { - if (node->prefix->ref_count == 1) { - patricia_remove(iptree, node); - } else { - patricia_deref_prefix(node->prefix); - } - } + derefnode(iptree,node); + node->exts[index]=NULL; } - node->exts[index]=NULL; } PATRICIA_WALK_CLEAR_END; }