redir_parsing: fix memory leak when parsing a redirection with an operator as specifier

if the specifier was not WORD_TOKEN, the operator was not being freed
This commit is contained in:
Khaïs COLIN 2025-04-16 14:03:48 +02:00
parent 84a246f6f6
commit 9a32220945
2 changed files with 13 additions and 6 deletions

View file

@ -613,4 +613,13 @@ parsed command
╰─ redirections = (empty redir list)
EOF
when_run <<EOF "multiple >"
> > > >
echo \$?
EOF
expecting <<"EOF"
minishell: syntax error near unexpected token `>'
2
EOF
finalize