svn commit: r311587 - stable/10/contrib/netbsd-tests/lib/libc/sys
Ngie Cooper
ngie at FreeBSD.org
Sat Jan 7 08:18:26 UTC 2017
Author: ngie
Date: Sat Jan 7 08:18:25 2017
New Revision: 311587
URL: https://svnweb.freebsd.org/changeset/base/311587
Log:
MFC r311239:
umask_open: don't leak fd on success
CID: 978315
Modified:
stable/10/contrib/netbsd-tests/lib/libc/sys/t_umask.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/contrib/netbsd-tests/lib/libc/sys/t_umask.c
==============================================================================
--- stable/10/contrib/netbsd-tests/lib/libc/sys/t_umask.c Sat Jan 7 08:16:52 2017 (r311586)
+++ stable/10/contrib/netbsd-tests/lib/libc/sys/t_umask.c Sat Jan 7 08:18:25 2017 (r311587)
@@ -129,6 +129,9 @@ ATF_TC_BODY(umask_open, tc)
if (fd < 0)
continue;
+#ifdef __FreeBSD__
+ (void)close(fd);
+#endif
(void)memset(&st, 0, sizeof(struct stat));
if (stat(path, &st) != 0) {
More information about the svn-src-stable
mailing list