NetBSD-Bugs archive

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

Re: bin/51860: [PATCH] tests/lib/libc/sys/t_revoke: don't leak fd



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

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

 --Apple-Mail=_AA9106D2-F495-41AE-A976-276A7DD9F421
 Content-Disposition: attachment;
 	filename=t_revoke-dont-leak-fd.patch
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="t_revoke-dont-leak-fd.patch"
 Content-Transfer-Encoding: 7bit
 
 Index: lib/libc/sys/t_revoke.c
 ===================================================================
 RCS file: /cvsroot/src/tests/lib/libc/sys/t_revoke.c,v
 retrieving revision 1.1
 diff -u -r1.1 t_revoke.c
 --- lib/libc/sys/t_revoke.c	7 Jul 2011 06:57:54 -0000	1.1
 +++ lib/libc/sys/t_revoke.c	13 Jan 2017 06:47:33 -0000
 @@ -167,6 +167,7 @@
  	if (WIFEXITED(sta) == 0 || WEXITSTATUS(sta) != EXIT_SUCCESS)
  		atf_tc_fail("revoke(2) did not obey permissions");
  
 +	(void)close(fd);
  	ATF_REQUIRE(unlink(path) == 0);
  }
  
 
 --Apple-Mail=_AA9106D2-F495-41AE-A976-276A7DD9F421--
 


Home | Main Index | Thread Index | Old Index