]> jfr.im git - solanum.git/commitdiff
Fix a place aconfs could be freed while referenced
authorEd Kellett <redacted>
Wed, 1 Jan 2020 08:48:50 +0000 (08:48 +0000)
committerEd Kellett <redacted>
Wed, 1 Jan 2020 08:51:53 +0000 (08:51 +0000)
(not a bug until a9536f755 since bans were not referenced before)

ircd/s_conf.c

index be7f7b2fe9e5ae5c1d14e4a7fcfc9d44c5dcdad8..e0fa68026638ab88041f0e2978a65b94b3d03801 100644 (file)
@@ -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)