From 548e31d3bd862ce80b6d4f51bcedf6bfb5a0805c Mon Sep 17 00:00:00 2001 From: Ed Kellett Date: Wed, 1 Jan 2020 08:48:50 +0000 Subject: [PATCH] Fix a place aconfs could be freed while referenced (not a bug until a9536f755 since bans were not referenced before) --- ircd/s_conf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ircd/s_conf.c b/ircd/s_conf.c index be7f7b2f..e0fa6802 100644 --- a/ircd/s_conf.c +++ b/ircd/s_conf.c @@ -1135,8 +1135,10 @@ deactivate_conf(struct ConfItem *aconf, rb_dlink_node *ptr, time_t now) del_from_resv_hash(aconf->host, aconf); break; } - if (aconf->lifetime != 0 && now < aconf->lifetime) + if (aconf->clients > 0 || (aconf->lifetime != 0 && now < aconf->lifetime)) + { aconf->status |= CONF_ILLEGAL; + } else { if (aconf->lifetime != 0)