0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-27 07:54:05 +01:00

ircd: Fix missing operhash reference decrement from b02a913b.

This commit is contained in:
Jason Volk 2016-07-19 15:59:35 -07:00
parent d58468f03b
commit fbcb6a2549

View 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);
}
}