]> jfr.im git - solanum.git/blobdiff - ircd/s_conf.c
Merge pull request #303 from edk0/modreload-uaf
[solanum.git] / ircd / s_conf.c
index be7f7b2fe9e5ae5c1d14e4a7fcfc9d44c5dcdad8..2021185127571eafcfd324040f1d9b4a16d08af7 100644 (file)
@@ -1136,12 +1136,17 @@ deactivate_conf(struct ConfItem *aconf, rb_dlink_node *ptr, time_t now)
                        break;
        }
        if (aconf->lifetime != 0 && now < aconf->lifetime)
+       {
                aconf->status |= CONF_ILLEGAL;
+       }
        else
        {
                if (aconf->lifetime != 0)
                        rb_dlinkDestroy(ptr, &prop_bans);
-               free_conf(aconf);
+               if (aconf->clients == 0)
+                       free_conf(aconf);
+               else
+                       aconf->status |= CONF_ILLEGAL;
        }
 }