diff options
-rw-r--r-- | node.c | 5 | ||||
-rw-r--r-- | scope.c | 1 |
2 files changed, 5 insertions, 1 deletions
@@ -47,7 +47,10 @@ node *n; { node *tmp; - for(tmp = n; tmp; tmp = n = n->next) { + for(tmp = n; tmp;) { + n = tmp->next; free(tmp); + tmp = NULL; + tmp = n; } } @@ -35,6 +35,7 @@ scope *s; } free(s); + s = NULL; } /*Copied from Compilers, Aho*/ |