0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-27 19:28:52 +02:00

Merge pull request #201 from jevolk/master

ircd: Fix missing operhash reference decrement from b02a913b.
This commit is contained in:
William Pitcock 2016-07-19 18:14:50 -05:00 committed by GitHub
commit 3ec073dc83

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