m_grant: maintain privilegeset refcounts

This commit is contained in:
Ed Kellett 2019-07-27 15:42:36 +01:00
parent 6119faa9a0
commit bdc87b5f37
No known key found for this signature in database
GPG Key ID: CB9986DEF342FABC
1 changed files with 7 additions and 0 deletions

View File

@ -161,6 +161,13 @@ static int do_grant(struct Client *source_p, struct Client *target_p, const char
oper_up(target_p, &oper);
}
else if (privset != NULL)
{
privilegeset_ref(privset);
}
if (target_p->user->privset != NULL)
privilegeset_unref(target_p->user->privset);
target_p->user->privset = privset;
const char *modeparv[4];