aboutsummaryrefslogtreecommitdiff
path: root/hush.c
diff options
context:
space:
mode:
Diffstat (limited to 'hush.c')
-rw-r--r--hush.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/hush.c b/hush.c
index 372c95753..a58da189c 100644
--- a/hush.c
+++ b/hush.c
@@ -1018,7 +1018,8 @@ static int setup_redirects(struct child_prog *prog, int squirrel[])
1018 close(openfd); 1018 close(openfd);
1019 } else { 1019 } else {
1020 dup2(openfd, redir->fd); 1020 dup2(openfd, redir->fd);
1021 close(openfd); 1021 if (redir->dup == -1)
1022 close (openfd);
1022 } 1023 }
1023 } 1024 }
1024 } 1025 }