diff options
author | ngie <ngie@FreeBSD.org> | 2017-01-07 09:21:26 +0000 |
---|---|---|
committer | ngie <ngie@FreeBSD.org> | 2017-01-07 09:21:26 +0000 |
commit | ab93c8b479434952500096c00487aabfb5fa7b30 (patch) | |
tree | 8c894b35db623e766fb4cad39cbb8b7d20a30b1c | |
parent | 1385b933c8d9fdf4da14be9eb1dd84584b86c19c (diff) | |
download | FreeBSD-src-ab93c8b479434952500096c00487aabfb5fa7b30.zip FreeBSD-src-ab93c8b479434952500096c00487aabfb5fa7b30.tar.gz |
MFC r311271:
stat_symlink: don't leak fd; close the file descriptor when done
CID: 978314
-rw-r--r-- | contrib/netbsd-tests/lib/libc/sys/t_stat.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/netbsd-tests/lib/libc/sys/t_stat.c b/contrib/netbsd-tests/lib/libc/sys/t_stat.c index 5e1d17e..300c6e8 100644 --- a/contrib/netbsd-tests/lib/libc/sys/t_stat.c +++ b/contrib/netbsd-tests/lib/libc/sys/t_stat.c @@ -398,6 +398,9 @@ ATF_TC_BODY(stat_symlink, tc) ATF_REQUIRE(unlink(path) == 0); ATF_REQUIRE(unlink(pathlink) == 0); +#ifdef __FreeBSD__ + (void)close(fd); +#endif } ATF_TC_CLEANUP(stat_symlink, tc) |