fix: merging all the code

This commit is contained in:
Matteo Flebus 2026-01-15 18:49:42 +01:00
parent 2e9e98d343
commit 1eecb1bd42
12 changed files with 86 additions and 61 deletions

View file

@ -31,15 +31,14 @@ bool ast_is_if(struct ast *node)
return node->type == AST_IF;
}
void ast_free_if(struct ast_if **if_data)
void ast_free_if(struct ast_if *if_data)
{
if (if_data == NULL || *if_data == NULL)
if (if_data == NULL)
return;
ast_free((*if_data)->condition);
ast_free((*if_data)->then_clause);
ast_free((*if_data)->else_clause);
ast_free(&if_data->condition);
ast_free(&if_data->then_clause);
ast_free(&if_data->else_clause);
free(*if_data);
*if_data = NULL;
free(if_data);
}