]> jfr.im git - irc/quakenet/newserv.git/commitdiff
we can just call deref here
authorPaul <redacted>
Wed, 29 Oct 2008 22:07:44 +0000 (22:07 +0000)
committerPaul <redacted>
Wed, 29 Oct 2008 22:07:44 +0000 (22:07 +0000)
--HG--
branch : paul

patricia/patricia.c

index 2f0e510dfc39b7257768382d9cd8734b78390526..7928c782a6803f6ea97eec31c4b9e8a3396cc977 100644 (file)
@@ -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;
 }