Fix a place aconfs could be freed while referenced

(not a bug until a9536f755 since bans were not referenced before)
This commit is contained in:
Ed Kellett 2020-01-01 08:48:50 +00:00
parent 5eb10743f9
commit 548e31d3bd
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

@ -1135,8 +1135,10 @@ deactivate_conf(struct ConfItem *aconf, rb_dlink_node *ptr, time_t now)
del_from_resv_hash(aconf->host, aconf); del_from_resv_hash(aconf->host, aconf);
break; break;
} }
if (aconf->lifetime != 0 && now < aconf->lifetime) if (aconf->clients > 0 || (aconf->lifetime != 0 && now < aconf->lifetime))
{
aconf->status |= CONF_ILLEGAL; aconf->status |= CONF_ILLEGAL;
}
else else
{ {
if (aconf->lifetime != 0) if (aconf->lifetime != 0)