]> jfr.im git - irc/quakenet/newserv.git/blobdiff - patricia/patricia.c
fix bug in G stats
[irc/quakenet/newserv.git] / patricia / patricia.c
index 049f993a6330b85238ec087a237280a77f0287a2..7928c782a6803f6ea97eec31c4b9e8a3396cc977 100644 (file)
@@ -121,9 +121,12 @@ void releasenodeext(int index) {
 
   head = iptree->head;
 
-  PATRICIA_WALK_ALL(head, node)
+  PATRICIA_WALK_CLEAR(head, node)
   {
+    if ( node->exts[index] ) { 
+      derefnode(iptree,node);
       node->exts[index]=NULL;
-  } PATRICIA_WALK_END;
+    }
+  } PATRICIA_WALK_CLEAR_END;
 }