summaryrefslogtreecommitdiffstats
path: root/sys/kern/sys_pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r--sys/kern/sys_pipe.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c
index 4543cbe9678..52e6dbbbb30 100644
--- a/sys/kern/sys_pipe.c
+++ b/sys/kern/sys_pipe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sys_pipe.c,v 1.41 2002/01/23 00:39:47 art Exp $ */
+/* $OpenBSD: sys_pipe.c,v 1.42 2002/02/08 13:53:28 art Exp $ */
/*
* Copyright (c) 1996 John S. Dyson
@@ -146,11 +146,13 @@ sys_opipe(p, v, retval)
FILE_SET_MATURE(wf);
return (0);
free3:
- ffree(rf);
fdremove(fdp, retval[0]);
+ closef(rf, p);
+ rpipe = NULL;
free2:
(void)pipeclose(wpipe);
- (void)pipeclose(rpipe);
+ if (rpipe != NULL)
+ (void)pipeclose(rpipe);
return (error);
}