diff options
| author | Paul Sokolovsky | 2014-01-25 00:56:19 +0200 |
|---|---|---|
| committer | Paul Sokolovsky | 2014-01-25 02:11:59 +0200 |
| commit | aee2ba70de774f954a793efb73e72faaf4e6524d (patch) | |
| tree | 0fc96ca80a0605d7335bddb238fc95ff6568e667 /unix | |
| parent | c1d200ef74c9a76a661cfbb3f2f73db992f0e272 (diff) | |
Add parse_node_free_struct() and use it to free parse tree after compilation.
TODO: Check lexer/parse/compile error path for leaks too.
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/main.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c index 681bf2aa2..34d9618ca 100644 --- a/unix/main.c +++ b/unix/main.c @@ -62,6 +62,7 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind */ mp_obj_t module_fun = mp_compile(pn, source_name, is_repl); + parse_node_free_struct(pn); if (module_fun == mp_const_none) { // compile error |
