The call to init_file() needs to be moved outside the loop in statd.c,

otherwise mmap() gets called multiple times, which eventually fails due
to address space exhaustion on i386.

Approved by:	re (kensmith)
MFC after:	1 week
This commit is contained in:
Don Lewis 2007-08-05 16:33:06 +00:00
parent cc977adc71
commit f61a23adcc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171733

View File

@ -183,9 +183,9 @@ main(int argc, char **argv)
transports[i]); transports[i]);
/* NOTREACHED */ /* NOTREACHED */
} }
init_file("/var/db/statd.status");
freenetconfigent(nconf); freenetconfigent(nconf);
} }
init_file("/var/db/statd.status");
/* Note that it is NOT sensible to run this program from inetd - the */ /* Note that it is NOT sensible to run this program from inetd - the */
/* protocol assumes that it will run immediately at boot time. */ /* protocol assumes that it will run immediately at boot time. */