diff options
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index a48c32d..9d97e3b 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -258,10 +258,12 @@ pipe(td, uap) 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 + } else { FILEDESC_UNLOCK(fdp); + } fdrop(rf, td); /* rpipe has been closed by fdrop(). */ pipeclose(wpipe); |