diff options
author | jon <jon@FreeBSD.org> | 2001-08-03 00:23:37 +0000 |
---|---|---|
committer | jon <jon@FreeBSD.org> | 2001-08-03 00:23:37 +0000 |
commit | d83e2b381c7b74091edd587f049d237fe1376606 (patch) | |
tree | 77526c72c9027448e52466556fe5dcc53d4568d0 | |
parent | 03f8cf60cf76dac14fbb31af0d81eb8d735017a7 (diff) | |
download | FreeBSD-src-d83e2b381c7b74091edd587f049d237fe1376606.zip FreeBSD-src-d83e2b381c7b74091edd587f049d237fe1376606.tar.gz |
Fixes file descriptor leak in standalone mode.
Prevents simultaneous calls to updatestat() as function is not reentrant.
PR: bin/24857
Submitted by: Martin Butkus <mb@bagheera.thgwf.de>
MFC after: 1 month
-rw-r--r-- | libexec/rpc.rstatd/rstat_proc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 7f6bd55..1014326 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -115,6 +115,7 @@ stat_init() { stat_is_init = 1; setup(); + alarm(0); updatestat(); (void) signal(SIGALRM, updatestat); alarm(1); @@ -203,6 +204,7 @@ updatestat() #ifdef DEBUG fprintf(stderr, "about to closedown\n"); #endif + kvm_close(kd); if (from_inetd) exit(0); else { |