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

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