fix: fixed segfault caused by invalid read
NULL value caused the error logger to crash
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user