Free() panics are no longer deadly

This commit is contained in:
joonicks
2018-03-27 23:26:34 +02:00
parent 7c5611931b
commit d9fac6178c
8 changed files with 62 additions and 16 deletions

View File

@@ -818,6 +818,9 @@ int main(int argc, char **argv, char **envp)
char *opt;
int do_fork = TRUE;
int versiononly = FALSE;
#ifdef NEWBIE
int n = 0;
#endif
uptime = time(&now);
@@ -1017,12 +1020,12 @@ execve( ./energymech, argv = { ./energymech <NULL> <NULL> <NULL> <NULL> }, envp
LocalBot.x.x.aop = 1;
LocalBot.chan = CoreUser.chan = (Strp*)&CMA;
readcfgfile();
#ifdef UPTIME
init_uptime();
#endif /* UPTIME */
readcfgfile();
#ifndef I_HAVE_A_LEGITIMATE_NEED_FOR_MORE_THAN_4_BOTS
if (spawning_lamer > 4)
{
@@ -1035,7 +1038,20 @@ execve( ./energymech, argv = { ./energymech <NULL> <NULL> <NULL> <NULL> }, envp
{
if ((opt = current->setting[STR_USERFILE].str_var))
read_userlist(opt);
#ifdef NEWBIE
if (current->userlist == NULL)
{
to_file(1,"init: No userlist loaded for %s\n",nullstr(current->nick));
n++;
}
}
if (n)
{
_exit(1);
}
#else
}
#endif /* NEWBIE */
for(current=botlist;current;current=current->next)
{
mirror_userlist();
@@ -1104,5 +1120,6 @@ execve( ./energymech, argv = { ./energymech <NULL> <NULL> <NULL> <NULL> }, envp
#endif /* DEBUG */
}
startup = FALSE;
doit();
}