summaryrefslogtreecommitdiffstats
path: root/usr.bin/w/w.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/w/w.c')
-rw-r--r--usr.bin/w/w.c5
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);
}
OpenPOWER on IntegriCloud