Module Name:    src
Committed By:   alnsn
Date:           Thu Aug 16 20:16:06 UTC 2012

Modified Files:
        src/tests/net/bpfilter: t_bpfilter.c

Log Message:
Close pipes on exit.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/net/bpfilter/t_bpfilter.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/net/bpfilter/t_bpfilter.c
diff -u src/tests/net/bpfilter/t_bpfilter.c:1.3 src/tests/net/bpfilter/t_bpfilter.c:1.4
--- src/tests/net/bpfilter/t_bpfilter.c:1.3	Thu Aug 16 19:42:23 2012
+++ src/tests/net/bpfilter/t_bpfilter.c	Thu Aug 16 20:16:06 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_bpfilter.c,v 1.3 2012/08/16 19:42:23 alnsn Exp $	*/
+/*	$NetBSD: t_bpfilter.c,v 1.4 2012/08/16 20:16:06 alnsn Exp $	*/
 
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_bpfilter.c,v 1.3 2012/08/16 19:42:23 alnsn Exp $");
+__RCSID("$NetBSD: t_bpfilter.c,v 1.4 2012/08/16 20:16:06 alnsn Exp $");
 
 #include <sys/param.h>
 #include <sys/ioctl.h>
@@ -221,6 +221,8 @@ magic_ping_test(const char *name, unsign
 		netcfg_rump_if(ifr.ifr_name, "10.1.1.10", "255.0.0.0");
 		ATF_CHECK(write(channel[1], "U", 1) == 1);
 		ATF_CHECK(read(channel[0], &token, 1) == 1 && token == 'D');
+		close(channel[0]);
+		close(channel[1]);
 		return;
 	default:
 		break;
@@ -261,6 +263,9 @@ magic_ping_test(const char *name, unsign
 
 	ATF_CHECK(write(channel[1], "D", 1) == 1);
 
+	close(channel[0]);
+	close(channel[1]);
+
 	RL(waitpid(child, &status, 0));
 	ATF_CHECK(!WIFSIGNALED(status));
 }

Reply via email to