found this bug in the main tere. We should die gracefully if we can't allocate memory for the zone.

This commit is contained in:
Bill Currie 2000-05-15 00:43:19 +00:00
parent 9b46606595
commit a7b5176e68

View file

@ -420,6 +420,10 @@ int main (int c, char **v)
if (j) if (j)
parms.memsize = (int) (Q_atof(com_argv[j+1]) * 1024 * 1024); parms.memsize = (int) (Q_atof(com_argv[j+1]) * 1024 * 1024);
parms.membase = malloc (parms.memsize); parms.membase = malloc (parms.memsize);
if (!perms.membase) {
printf("Can't allocate memroy for zone.\n");
return 1;
}
parms.basedir = basedir; parms.basedir = basedir;
// caching is disabled by default, use -cachedir to enable // caching is disabled by default, use -cachedir to enable