Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen PR/51813: Ngie Cooper: don't leak fd :tty...
details: https://anonhg.NetBSD.org/src/rev/a1c202b8ab3d
branches: trunk
changeset: 350338:a1c202b8ab3d
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 10 15:33:40 2017 +0000
description:
PR/51813: Ngie Cooper: don't leak fd :ttyname_err
diffstat:
tests/lib/libc/gen/t_ttyname.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 9e488e8bb24b -r a1c202b8ab3d tests/lib/libc/gen/t_ttyname.c
--- a/tests/lib/libc/gen/t_ttyname.c Tue Jan 10 15:32:46 2017 +0000
+++ b/tests/lib/libc/gen/t_ttyname.c Tue Jan 10 15:33:40 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $ */
+/* $NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ttyname.c,v 1.3 2011/05/01 18:14:01 jruoho Exp $");
+__RCSID("$NetBSD: t_ttyname.c,v 1.4 2017/01/10 15:33:40 christos Exp $");
#include <atf-c.h>
#include <errno.h>
@@ -78,6 +78,7 @@
ATF_REQUIRE(ttyname(fd) == NULL);
ATF_REQUIRE(errno == ENOTTY);
+ (void)close(fd);
}
}
Home |
Main Index |
Thread Index |
Old Index