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:
parent
d58468f03b
commit
fbcb6a2549
1 changed files with 8 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue