Check if users_max is less than users_min

This commit is contained in:
ManiacTwister 2018-11-26 20:12:04 +01:00
parent 6d01464fc5
commit 23e6d4ed73

View file

@ -1829,6 +1829,17 @@ conf_end_fakechannel(struct TopConf *tc)
{ {
conf_report_error("Ignoring fakechannel -- must have a name."); 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); rb_free(yy_fakechannel);
return -1; return -1;