]> jfr.im git - solanum.git/blobdiff - ircd/operhash.c
Add general::tls_ciphers_oper_only
[solanum.git] / ircd / operhash.c
index a8348cb200adb83c26967aa21338b90de5fa9763..6d1948e6e0889ff93c4ed99eb825eea1178fa863 100644 (file)
@@ -85,6 +85,13 @@ operhash_delete(const char *name)
 {
        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);
+       }
 }