summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-25 00:56:19 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-25 02:11:59 +0200
commitaee2ba70de774f954a793efb73e72faaf4e6524d (patch)
tree0fc96ca80a0605d7335bddb238fc95ff6568e667 /unix/main.c
parentc1d200ef74c9a76a661cfbb3f2f73db992f0e272 (diff)
downloadmicropython-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.c1
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