Compare commits

...

2 Commits

Author SHA1 Message Date
9d457f1040 norminette: added space after keyword 2026-02-11 08:37:02 +01:00
6b3d2ba5e0 fix: fixed segfault caused by invalid read
NULL value caused the error logger to crash
2026-02-11 08:36:05 +01:00

View File

@@ -148,7 +148,7 @@ t_redirection *redirection_new(
if (*tokens == NULL)
{
free(redirection);
return (syntax_error_unexpected_token(NULL), NULL);
return (syntax_error_unexpected_token(token), NULL);
}
token = (t_token *)(*tokens)->content;
if (token->type != TOKEN_WORD)
@@ -266,7 +266,7 @@ void redirection_add(
redirection = redirection_new(tokens);
if (redirection == NULL)
return;
return ;
redirection_tokens = ft_lstnew(redirection);
if (redirection_tokens == NULL)
{