diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-15 21:48:00 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-15 21:48:00 -0400 |
commit | fda3c8546d56b17a1921e495ebc08bc429f06582 (patch) | |
tree | 43a1e9031392419c9c2e20e1cbcaa037857676ff | |
parent | 4b34d642384d6237c0af46fb48ec9e8bd98efad0 (diff) |
Add frees id_list/type trees after update ID types
-rw-r--r-- | tree.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -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; } |