From aee2ba70de774f954a793efb73e72faaf4e6524d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 25 Jan 2014 00:56:19 +0200 Subject: Add parse_node_free_struct() and use it to free parse tree after compilation. TODO: Check lexer/parse/compile error path for leaks too. --- unix/main.c | 1 + 1 file changed, 1 insertion(+) (limited to 'unix') 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 -- cgit v1.2.3