Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/sys PR/51862: Ngie Cooper: don't leak buf



details:   https://anonhg.NetBSD.org/src/rev/44cd4c1c5208
branches:  trunk
changeset: 820714:44cd4c1c5208
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Jan 13 21:16:38 2017 +0000

description:
PR/51862: Ngie Cooper: don't leak buf

diffstat:

 tests/lib/libc/sys/t_setrlimit.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r ac199cb97cc8 -r 44cd4c1c5208 tests/lib/libc/sys/t_setrlimit.c
--- a/tests/lib/libc/sys/t_setrlimit.c  Fri Jan 13 21:15:57 2017 +0000
+++ b/tests/lib/libc/sys/t_setrlimit.c  Fri Jan 13 21:16:38 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.6 2017/01/13 21:16:38 christos Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setrlimit.c,v 1.5 2016/07/13 09:53:16 njoly Exp $");
+__RCSID("$NetBSD: t_setrlimit.c,v 1.6 2017/01/13 21:16:38 christos Exp $");
 
 #include <sys/resource.h>
 #include <sys/mman.h>
@@ -122,6 +122,7 @@
 
        if (lim != 0)
                atf_tc_fail("failed to set limit (%d)", lim);
+       free(buf);
 }
 
 ATF_TC(setrlimit_current);



Home | Main Index | Thread Index | Old Index