diff options
author | ngie <ngie@FreeBSD.org> | 2017-01-07 09:44:57 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-01-07 09:44:57 +0000 |
commit | e28b4d14bca4773dc91cdf9c7b6b92ad4f59f52a (patch) | |
tree | 374c4e7370e52b42a3ac3f8f04039235035ad6ed /contrib/netbsd-tests | |
parent | 10190c8fffbc77691236950b05f461be28bab3b5 (diff) | |
download | FreeBSD-src-e28b4d14bca4773dc91cdf9c7b6b92ad4f59f52a.zip FreeBSD-src-e28b4d14bca4773dc91cdf9c7b6b92ad4f59f52a.tar.gz |
MFC r311245:
tty: don't leak s after opening it with openpty
CID: 978321
Diffstat (limited to 'contrib/netbsd-tests')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c b/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c index 5a5ec0f..1e42536 100644 --- a/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c +++ b/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c @@ -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); } |