Merge pull request #301 from edk0/reject-free-fix-fix

Remove from the list of propagated bans on expiry
This commit is contained in:
Aaron Jones 2020-01-02 17:24:25 +00:00 committed by GitHub
commit cd39eef71e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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