ircd: Fix missing operhash reference decrement from b02a913b.

This commit is contained in:
Jason Volk 2016-07-19 15:59:35 -07:00 committed by Aaron Jones
parent e4a7cf9f50
commit 4cc889ae17
No known key found for this signature in database
GPG key ID: 6E854C0FAAD4CEA4

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