]> jfr.im git - irc/charybdis-ircd/charybdis.git/commitdiff
Check if users_max is less than users_min
authorManiacTwister <redacted>
Mon, 26 Nov 2018 19:12:04 +0000 (20:12 +0100)
committerManiacTwister <redacted>
Mon, 26 Nov 2018 19:12:04 +0000 (20:12 +0100)
src/newconf.c

index c048bcbd68c0c8e61dc8348dbe2d21ab4eb3ddd0..22a98887bdf5abc3c1715dca5a95f3402b92a10c 100644 (file)
@@ -1829,6 +1829,17 @@ conf_end_fakechannel(struct TopConf *tc)
        {
                conf_report_error("Ignoring fakechannel -- must have a name.");
 
+               rb_free(yy_fakechannel->topic);
+               rb_free(yy_fakechannel);
+
+               return -1;
+       }
+
+       if (yy_fakechannel->users_max < yy_fakechannel->users_min)
+       {
+               conf_report_error("Ignoring fakechannel -- users_max less than users_min.");
+
+               rb_free(yy_fakechannel->topic);
                rb_free(yy_fakechannel);
 
                return -1;