svn commit: r311273 - head/contrib/netbsd-tests/lib/libc/sys
Ngie Cooper
ngie at FreeBSD.org
Wed Jan 4 09:00:17 UTC 2017
Author: ngie
Date: Wed Jan 4 09:00:16 2017
New Revision: 311273
URL: https://svnweb.freebsd.org/changeset/base/311273
Log:
setrlimit_basic: don't leak buf; free it on completion
MFC after: 3 days
Reported by: Coverity
CID: 978311
Modified:
head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c
Modified: head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Wed Jan 4 08:59:06 2017 (r311272)
+++ head/contrib/netbsd-tests/lib/libc/sys/t_setrlimit.c Wed Jan 4 09:00:16 2017 (r311273)
@@ -129,6 +129,9 @@ out:
if (lim != 0)
atf_tc_fail("failed to set limit (%d)", lim);
+#ifdef __FreeBSD__
+ free(buf);
+#endif
}
ATF_TC(setrlimit_current);
More information about the svn-src-all
mailing list