aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-29 21:29:24 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-29 21:29:24 -0400
commit82dc3cf8d980b010a1cf2e3ac1c438c1412a21f8 (patch)
tree5012f9871c560b9d77bc67dc04db7e51be8d8f4b
parentaa3c988854bde354efd1dbcb3d85efcc56ad9cd2 (diff)
Add notes on location of frees
-rw-r--r--scope.c2
-rw-r--r--tree.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/scope.c b/scope.c
index 0355014..8b70c5b 100644
--- a/scope.c
+++ b/scope.c
@@ -36,6 +36,8 @@ scope *s;
free_list(s->table[i]);
}
+ /*free_list takes care of freeing s->ret_var*/
+
free(s);
s = NULL;
}
diff --git a/tree.c b/tree.c
index d59fd18..2b6bd9d 100644
--- a/tree.c
+++ b/tree.c
@@ -246,4 +246,6 @@ ptree *t;
free_tree(t->l);
free_tree(t->r);
free(t);
+
+ /*t->attr.nval freed in free_scope*/
}