Remove from the list of propagated bans on expiry

Fixes a use-after-free introduced in 548e31d3b, which fixed a related
use-after-free introduced in a9536f755.
This commit is contained in:
Ed Kellett 2020-01-01 23:58:00 +00:00
parent b21c1403c6
commit 0a7faba63d
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC

View file

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