svn commit: r311245 - head/contrib/netbsd-tests/lib/libc/ttyio
Ngie Cooper
ngie at FreeBSD.org
Wed Jan 4 04:19:06 UTC 2017
Author: ngie
Date: Wed Jan 4 04:19:05 2017
New Revision: 311245
URL: https://svnweb.freebsd.org/changeset/base/311245
Log:
tty: don't leak s after opening it with openpty
MFC after: 3 days
Reported by: Coverity
CID: 978321
Modified:
head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c
Modified: head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Wed Jan 4 04:10:36 2017 (r311244)
+++ head/contrib/netbsd-tests/lib/libc/ttyio/t_ttyio.c Wed Jan 4 04:19:05 2017 (r311245)
@@ -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);
}
More information about the svn-src-head
mailing list