Module Name: src
Committed By: christos
Date: Tue Jan 10 15:19:52 UTC 2017
Modified Files:
src/tests/lib/libc/gen: t_ftok.c
Log Message:
PR/51809: Ngie Cooper: fix file descriptor leak
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_ftok.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/gen/t_ftok.c
diff -u src/tests/lib/libc/gen/t_ftok.c:1.1 src/tests/lib/libc/gen/t_ftok.c:1.2
--- src/tests/lib/libc/gen/t_ftok.c:1.1 Tue Nov 8 00:47:00 2011
+++ src/tests/lib/libc/gen/t_ftok.c Tue Jan 10 10:19:52 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $ */
+/* $NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ftok.c,v 1.1 2011/11/08 05:47:00 jruoho Exp $");
+__RCSID("$NetBSD: t_ftok.c,v 1.2 2017/01/10 15:19:52 christos Exp $");
#include <sys/types.h>
#include <sys/ipc.h>
@@ -68,6 +68,7 @@ ATF_TC_BODY(ftok_link, tc)
fd = open(path, O_RDONLY | O_CREAT);
ATF_REQUIRE(fd >= 0);
+ (void)close(fd);
ATF_REQUIRE(link(path, hlnk) == 0);
ATF_REQUIRE(symlink(path, slnk) == 0);