diff options
author | Camil Staps | 2016-08-30 21:28:08 +0200 |
---|---|---|
committer | Camil Staps | 2016-08-30 21:28:08 +0200 |
commit | 2218e6612081d14c2cd3c94391472ffe2f338944 (patch) | |
tree | 252a6e58137b69c43b292e448997eead78281b77 /interpreter/code.c | |
parent | Fixed issue with twice (diff) |
Fix one memory leak mentioned in #2; add debug dot graphs output
Diffstat (limited to 'interpreter/code.c')
-rw-r--r-- | interpreter/code.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/interpreter/code.c b/interpreter/code.c index c194d02..d0b5416 100644 --- a/interpreter/code.c +++ b/interpreter/code.c @@ -6,14 +6,14 @@ #include "mem.h" void fill_node_int(struct node** node, int i) { - free_node(*node, 0); + free_node(*node, 1, 0); (*node)->kind = EXPR_INT; (*node)->var1 = my_calloc(1, sizeof(int)); *((int*) (*node)->var1) = i; } void fill_node_name(struct node** node, char* s) { - free_node(*node, 0); + free_node(*node, 1, 0); (*node)->kind = EXPR_NAME; (*node)->var1 = my_calloc(1, strlen(s) + 1); strcpy((*node)->var1, s); |