Don't close file descriptors when we are duplicating them.
diff --git a/hush.c b/hush.c
index 372c957..a58da18 100644
--- a/hush.c
+++ b/hush.c
@@ -1018,7 +1018,8 @@
 				close(openfd);
 			} else {
 				dup2(openfd, redir->fd);
-				close(openfd);
+				if (redir->dup == -1)
+					close (openfd);
 			}
 		}
 	}