Date: Sat, 7 Jan 2017 08:16:52 +0000 (UTC) From: Ngie Cooper <ngie@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r311586 - stable/11/contrib/netbsd-tests/lib/libc/sys Message-ID: <201701070816.v078GqYR068948@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ngie Date: Sat Jan 7 08:16:52 2017 New Revision: 311586 URL: https://svnweb.freebsd.org/changeset/base/311586 Log: MFC r311239: umask_open: don't leak fd on success CID: 978315 Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c Directory Properties: stable/11/ (props changed) Modified: stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c ============================================================================== --- stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c Sat Jan 7 08:08:35 2017 (r311585) +++ stable/11/contrib/netbsd-tests/lib/libc/sys/t_umask.c Sat Jan 7 08:16:52 2017 (r311586) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701070816.v078GqYR068948>