diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-23 13:36:33 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-23 13:36:33 -0400 |
commit | e450aa68aff14eaf4f184130e2dc9145abad710f (patch) | |
tree | 16248cdddb27351643943d39855982eabb74008e | |
parent | 944512372b71c0a03639264896e791d80e3b0143 (diff) |
Fix node freeing
-rw-r--r-- | node.c | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -52,8 +52,13 @@ node *n; free(n->name); n->name = NULL; - if (n->func_info) + if (n->func_info) { + if(n->func_info->argv) + free(n->func_info->argv); + n->func_info->argv = NULL; + free(n->func_info); + } n->func_info = NULL; if (n->array_info) @@ -69,7 +74,8 @@ node *n; { node *tmp; - for(tmp = n; tmp;) { + tmp = n; + while(tmp) { n = tmp->next; free_node(tmp); tmp = n; |