Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys PR/51860: Ngie Cooper: don't leak fd
details: https://anonhg.NetBSD.org/src/rev/01cd54e6e42f
branches: trunk
changeset: 350571:01cd54e6e42f
user: christos <christos%NetBSD.org@localhost>
date: Fri Jan 13 21:15:57 2017 +0000
description:
PR/51860: Ngie Cooper: don't leak fd
diffstat:
tests/lib/libc/sys/t_revoke.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 187bcb91cdf6 -r 01cd54e6e42f tests/lib/libc/sys/t_revoke.c
--- a/tests/lib/libc/sys/t_revoke.c Fri Jan 13 21:15:14 2017 +0000
+++ b/tests/lib/libc/sys/t_revoke.c Fri Jan 13 21:15:57 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_revoke.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $ */
+/* $NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_revoke.c,v 1.1 2011/07/07 06:57:54 jruoho Exp $");
+__RCSID("$NetBSD: t_revoke.c,v 1.2 2017/01/13 21:15:57 christos Exp $");
#include <sys/resource.h>
#include <sys/wait.h>
@@ -167,6 +167,7 @@
if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS)
atf_tc_fail("revoke(2) did not obey permissions");
+ (void)close(fd);
ATF_REQUIRE(unlink(path) == 0);
}
Home |
Main Index |
Thread Index |
Old Index