diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-23 13:37:29 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-09-23 13:37:29 -0400 |
commit | 1798fb7a46632a9ccf6692fb42816a8e917a9d25 (patch) | |
tree | c6ccd90132293c8261a6ebf46e1d0bada457f0f9 | |
parent | e450aa68aff14eaf4f184130e2dc9145abad710f (diff) |
Fix frees id strings when not placed in node.
-rw-r--r-- | pc.y | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -337,6 +337,7 @@ var :ID { $$ = mkid(scope_safe_search(cur_scope,$1)); + free($1); } |ID '[' expr ']' { @@ -345,6 +346,7 @@ var $$ = mktree(ARRAY_ACCESS, mkid(tmp), $3); $$->attr.nval = $$->l->attr.nval; + free($1); } ; @@ -355,6 +357,7 @@ proc_statement tmp = check_exists(cur_scope, $1); $$ = mktree(PCALL, mkid(tmp), NULL); + free($1); } |ID '(' expr_list ')' { @@ -362,6 +365,8 @@ proc_statement tmp = check_exists(cur_scope, $1); $$ = mktree(PCALL, mkid(tmp), $3); + + free($1); } /*calls checked with proc_statement*/ ; @@ -417,6 +422,7 @@ factor tmp = check_exists(cur_scope, $1); $$ = mkid(tmp); + free($1); } |ID '[' expr ']' { @@ -424,6 +430,8 @@ factor tmp = check_exists(cur_scope, $1); $$ = mktree(ARRAY_ACCESS, mkid(tmp), $3); + + free($1); } |ID '(' expr_list ')' { @@ -432,6 +440,8 @@ factor tmp = check_exists(cur_scope, $1); $$ = mktree(FCALL, mkid(tmp), $3); check_call($$); + + free($1); } |INUM { |