fix: leak fd

This commit is contained in:
Camille Chauvet 2023-03-31 18:49:12 +02:00
parent f6617e07c7
commit b96b617e09

View File

@ -6,7 +6,7 @@
/* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */ /* By: cchauvet <cchauvet@student.42angoulem +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */ /* +#+#+#+#+#+ +#+ */
/* Created: 2023/02/17 15:36:26 by cchauvet #+# #+# */ /* Created: 2023/02/17 15:36:26 by cchauvet #+# #+# */
/* Updated: 2023/03/31 18:48:02 by alouis-j ### ########.fr */ /* Updated: 2023/03/31 18:49:06 by alouis-j ### ########.fr */
/* */ /* */
/* ************************************************************************** */ /* ************************************************************************** */
@ -78,7 +78,7 @@ int ft_heredoc(t_data *data, char *stop)
return (-2); return (-2);
} }
} }
*ft_get_heredoc() = -1; close(*ft_get_heredoc());
*ft_get_heredoc() = -1; *ft_get_heredoc() = -1;
close(fds[1]); close(fds[1]);
return (fds[0]); return (fds[0]);