Call kvm_close() before exit for consistency.

PR:		24654
Submitted by:	Daniel Hemmerich zartik@yahoo.com
This commit is contained in:
Poul-Henning Kamp 2001-05-28 21:30:31 +00:00
parent 5d57194434
commit c59c7f97ad
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=77367

View File

@ -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);
}