diff options
author | ngie <ngie@FreeBSD.org> | 2017-01-07 08:18:25 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-01-07 08:18:25 +0000 |
commit | 533e94c09b371da1caf9da9cb58e46c467d391f3 (patch) | |
tree | c3ac3bb7b4c49e56d1499e8244ca80b59fffb1a3 /contrib/netbsd-tests/lib/libc | |
parent | bc787c98b14f01171b59acd147727f543c738fa1 (diff) | |
download | FreeBSD-src-533e94c09b371da1caf9da9cb58e46c467d391f3.zip FreeBSD-src-533e94c09b371da1caf9da9cb58e46c467d391f3.tar.gz |
MFC r311239:
umask_open: don't leak fd on success
CID: 978315
Diffstat (limited to 'contrib/netbsd-tests/lib/libc')
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_umask.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_umask.c b/contrib/netbsd-tests/lib/libc/sys/t_umask.c index 748cbdc..7a65574 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_umask.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_umask.c @@ -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) { |