diff options
author | phk <phk@FreeBSD.org> | 2001-05-28 21:30:31 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-05-28 21:30:31 +0000 |
commit | 2595178f4bd2edc26423c897df7cb08e36dbfa6a (patch) | |
tree | 7582dadfdf64c21bcc1dc51fe0c36266cafb2958 /usr.bin/w | |
parent | 19b20edd4063454edfe9d46a08ec2249527d1e8b (diff) | |
download | FreeBSD-src-2595178f4bd2edc26423c897df7cb08e36dbfa6a.zip FreeBSD-src-2595178f4bd2edc26423c897df7cb08e36dbfa6a.tar.gz |
Call kvm_close() before exit for consistency.
PR: 24654
Submitted by: Daniel Hemmerich zartik@yahoo.com
Diffstat (limited to 'usr.bin/w')
-rw-r--r-- | usr.bin/w/w.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/w/w.c b/usr.bin/w/w.c index ef4030e..71ff199 100644 --- a/usr.bin/w/w.c +++ b/usr.bin/w/w.c @@ -266,8 +266,10 @@ main(argc, argv) if (header || wcmd == 0) { pr_header(&now, nusers); - if (wcmd == 0) + if (wcmd == 0) { + (void)kvm_close(kd); exit(0); + } #define HEADER_USER "USER" #define HEADER_TTY "TTY" @@ -417,6 +419,7 @@ main(argc, argv) longidle = pr_idle(ep->idle); (void)printf("%.*s\n", argwidth - longidle, ep->args); } + (void)kvm_close(kd); exit(0); } |