aboutsummaryrefslogtreecommitdiff
path: root/src/parser/parser.c
diff options
context:
space:
mode:
authorCharles Cabergs <me@cacharle.xyz>2020-10-09 20:40:49 +0200
committerCharles Cabergs <me@cacharle.xyz>2020-10-09 20:41:22 +0200
commita55e414f6709c6b22ff9805cd32a40fae9da2538 (patch)
treeeae9b8e9d6415b9b68d847ee83e4f3f4c126be87 /src/parser/parser.c
parent4f3b4275d79d2c9d9fe3de3932e235ce2262e5f5 (diff)
downloadminishell-a55e414f6709c6b22ff9805cd32a40fae9da2538.tar.gz
minishell-a55e414f6709c6b22ff9805cd32a40fae9da2538.tar.bz2
minishell-a55e414f6709c6b22ff9805cd32a40fae9da2538.zip
Added interpolation prototype (segfault on linux otherwise)
Diffstat (limited to 'src/parser/parser.c')
-rw-r--r--src/parser/parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parser/parser.c b/src/parser/parser.c
index be71097..9493955 100644
--- a/src/parser/parser.c
+++ b/src/parser/parser.c
@@ -6,7 +6,7 @@
/* By: nahaddac <nahaddac@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/06/17 18:09:04 by nahaddac #+# #+# */
-/* Updated: 2020/10/09 16:10:31 by cacharle ### ########.fr */
+/* Updated: 2020/10/09 20:39:47 by charles ### ########.fr */
/* */
/* ************************************************************************** */
@@ -226,8 +226,8 @@ t_parsed *parse_expr(t_tok_lst *input)
tmp = parse_redir(input, &parsed->ast->redirs);
if (tmp == NULL || tmp->syntax_error)
return (tmp);
- free(tmp);
input = tmp->rest;
+ free(tmp);
}
parsed->rest = input;
return (parsed);