Merge pull request #300 from edk0/reject-free-fix
Fix a use-after-free introduced in #298
This commit is contained in:
commit
b21c1403c6
1 changed files with 3 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue