NetBSD-Bugs archive

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

Re: bin/51862: [PATCH] tests/lib/libc/sys/t_setrlimit: don't leak buf



The following reply was made to PR bin/51862; it has been noted by GNATS.

From: "Ngie Cooper (yaneurabeya)" <yaneurabeya%gmail.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/51862: [PATCH] tests/lib/libc/sys/t_setrlimit: don't leak buf
Date: Thu, 12 Jan 2017 23:07:10 -0800

 --Apple-Mail=_99A97D81-2ED4-43D6-90EE-374D3F2DB7E8
 Content-Disposition: attachment;
 	filename=t_setrlimit-dont-leak-buf.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_setrlimit-dont-leak-buf.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: lib/libc/sys/t_setrlimit.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/sys/t_setrlimit.c,v
 retrieving revision 1.5
 diff -u -r1.5 t_setrlimit.c
 --- lib/libc/sys/t_setrlimit.c	13 Jul 2016 09:53:16 -0000	1.5
 +++ lib/libc/sys/t_setrlimit.c	13 Jan 2017 06:46:54 -0000
 @@ -122,6 +122,7 @@
  
  	if (lim != 0)
  		atf_tc_fail("failed to set limit (%d)", lim);
 +	free(buf);
  }
  
  ATF_TC(setrlimit_current);
 
 --Apple-Mail=_99A97D81-2ED4-43D6-90EE-374D3F2DB7E8--
 


Home | Main Index | Thread Index | Old Index