fix(parser): small typos

This commit is contained in:
matteo 2026-01-28 16:26:17 +01:00
parent efb0a6f148
commit 967a78e1a4

View file

@ -172,7 +172,7 @@ struct ast *parse_command(struct lexer_context *ctx)
/* @brief: frees command_elements and redirections lists /* @brief: frees command_elements and redirections lists
* @return: NULL * @return: NULL
*/ */
static err_simple_command(struct list *command_elements, static void *err_simple_command(struct list *command_elements,
struct list *redirections) struct list *redirections)
{ {
list_deep_destroy(command_elements); list_deep_destroy(command_elements);
@ -238,7 +238,7 @@ struct ast *parse_simple_command(struct lexer_context *ctx)
// TODO test this fix for the memory leaks // TODO test this fix for the memory leaks
char *word = strdup(element_word->word); char *word = strdup(element_word->word);
ast_free(element_word); ast_free(&element);
command_elements = list_append(command_elements, word); command_elements = list_append(command_elements, word);
// end of fix // end of fix
} }