-/* charybdis
+/* solanum
* operhash.c - Hashes nick!user@host{oper}
*
* Copyright (C) 2005 Lee Hardy <lee -at- leeh.co.uk>
{
struct operhash_entry *ohash = rb_radixtree_retrieve(operhash_tree, name);
- if (ohash != NULL)
+ if(ohash == NULL)
+ return;
+
+ ohash->refcount--;
+ if(ohash->refcount == 0)
+ {
+ rb_radixtree_delete(operhash_tree, ohash->name);
rb_free(ohash);
+ }
}