mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
parsing: fix some easy leaks
This commit is contained in:
parent
d40b6c3586
commit
0c489f25bb
2 changed files with 22 additions and 19 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/31 10:28:28 by jguelen #+# #+# */
|
||||
/* Updated: 2025/04/14 15:10:28 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/14 17:18:21 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -173,7 +173,7 @@ t_cmd *minishell_simple_parse(t_minishell *app, t_wordlist *tokens)
|
|||
t_redirect_add_back(&simple->value.simple->redirections, redir);
|
||||
}
|
||||
if (!simple->value.simple->words)
|
||||
return (parse_error(app, tokens->word), NULL);
|
||||
return (cmd_destroy(simple), parse_error(app, tokens->word), NULL);
|
||||
return (simple);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue