svn commit: r357556 - head/contrib/netbsd-tests/lib/libc/c063
Kyle Evans
kevans at FreeBSD.org
Wed Feb 5 02:30:46 UTC 2020
Author: kevans
Date: Wed Feb 5 02:30:46 2020
New Revision: 357556
URL: https://svnweb.freebsd.org/changeset/base/357556
Log:
O_SEARCH tests: plug trivial fd leak
Coverity correctly reports this as a resource leak. It's an admittedly minor
one, but plug it anyways.
This has been submitted upstream as misc/54939.
CID: 978288
Modified:
head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c
Modified: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Wed Feb 5 00:47:03 2020 (r357555)
+++ head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c Wed Feb 5 02:30:46 2020 (r357556)
@@ -265,6 +265,7 @@ ATF_TC_BODY(o_search_notdir, tc)
#endif
ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1);
ATF_REQUIRE(errno == ENOTDIR);
+ ATF_REQUIRE(close(dfd) == 0);
}
#ifdef USE_O_SEARCH
More information about the svn-src-all
mailing list