aboutsummaryrefslogtreecommitdiff
path: root/tree.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree.c')
-rw-r--r--tree.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tree.c b/tree.c
index 9b32f15..fc602a2 100644
--- a/tree.c
+++ b/tree.c
@@ -73,15 +73,13 @@ ptree *list, *t;
info->size = t->r->attr.ival - t->l->attr.ival;
info->start_idx = t->l->attr.ival;
}
+ free_tree(t);
if (list->type == ID) {
list->attr.nval->var_type = type;
if (info)
list->attr.nval->array_info = info;
- return;
- }
-
- while (list->r && list->r->type == ID) {
+ } else while (list->r && list->r->type == ID) {
/*Set type of right child through list*/
list->r->attr.nval->var_type = type;
if (info)
@@ -103,7 +101,7 @@ ptree *list, *t;
break; /*At _end_ of list (did not continue)*/
}
- /*TODO free t. and list?*/
+ free_tree(list);
return;
}