diff --git a/src/exec/exec_split_cmd.c b/src/exec/exec_split_cmd.c index c8348f7..46c2ae8 100644 --- a/src/exec/exec_split_cmd.c +++ b/src/exec/exec_split_cmd.c @@ -6,7 +6,7 @@ /* By: mmoussou outfile); if (((t_cmd *)(content))->infile != STDIN_FILENO) close(((t_cmd *)(content))->infile); - if (fd1) + if (fd1 != -1) close(fd1); - if (fd2) + if (fd2 != -1) close(fd2); }