tty: don't leak s after opening it with openpty

MFC after:	3 days
Reported by:	Coverity
CID:		978321
This commit is contained in:
Enji Cooper 2017-01-04 04:19:05 +00:00
parent 57f5b7d843
commit 3b33767589
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=311245

View file

@ -152,6 +152,9 @@ ATF_TC_BODY(ioctl, tc)
REQUIRE_ERRNO(sigaction(SIGCHLD, &sa, NULL), -1);
(void) wait(NULL);
#ifdef __FreeBSD__
(void)close(s);
#endif
ATF_REQUIRE_EQ(rc, 0);
}