diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-11-07 22:16:07 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2004-11-07 22:16:07 +0000 |
| commit | ef11fbd7c42f873c6fee899cb63ab143d345ea4d (patch) | |
| tree | a14848a9cd0a6a02b8bde301a11a3f8c51e8bdf7 /sys/kern/sys_pipe.c | |
| parent | e93bd4ef595751beb2445b73b2e470e7b6f40a61 (diff) | |
Notes
Diffstat (limited to 'sys/kern/sys_pipe.c')
| -rw-r--r-- | sys/kern/sys_pipe.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index b450cdd8875e..6865546e4053 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -384,15 +384,7 @@ pipe(td, uap) FILE_UNLOCK(rf); error = falloc(td, &wf, &fd); if (error) { - FILEDESC_LOCK(fdp); - if (fdp->fd_ofiles[td->td_retval[0]] == rf) { - fdp->fd_ofiles[td->td_retval[0]] = NULL; - fdunused(fdp, td->td_retval[0]); - FILEDESC_UNLOCK(fdp); - fdrop(rf, td); - } else { - FILEDESC_UNLOCK(fdp); - } + fdclose(fdp, rf, td->td_retval[0], td); fdrop(rf, td); /* rpipe has been closed by fdrop(). */ pipeclose(wpipe); |
