fixed a segfault

This commit is contained in:
mdev9
2024-03-02 17:00:58 +01:00
parent 25d81d04e2
commit 44f8024fc0
3 changed files with 16 additions and 12 deletions

View File

@ -6,7 +6,7 @@
/* By: marde-vr <marde-vr@42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/02/16 17:40:16 by marde-vr #+# #+# */
/* Updated: 2024/02/26 15:24:28 by marde-vr ### ########.fr */
/* Updated: 2024/02/29 13:13:15 by marde-vr ### ########.fr */
/* */
/* ************************************************************************** */
@ -24,7 +24,7 @@ void exec_rc_file(t_msh *msh, int fd)
msh->cmds = parse_command(line, msh->env);
exec_command(msh);
free_cmd(msh->cmds);
free(line);
//free(line);
}
free(line);
line = get_next_line(fd);