diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-25 00:56:19 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-25 02:11:59 +0200 |
commit | aee2ba70de774f954a793efb73e72faaf4e6524d (patch) | |
tree | 0fc96ca80a0605d7335bddb238fc95ff6568e667 /unix/main.c | |
parent | c1d200ef74c9a76a661cfbb3f2f73db992f0e272 (diff) | |
download | micropython-aee2ba70de774f954a793efb73e72faaf4e6524d.tar.gz micropython-aee2ba70de774f954a793efb73e72faaf4e6524d.zip |
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/main.c')
-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 681bf2aa20..34d9618ca2 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 |