From: Michael D. Lowis Date: Wed, 15 Oct 2014 02:05:07 +0000 (-0400) Subject: Fixed a memory leak X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=69b201b1bf568f9a0cf8f951402db04d2e5fb7f3;p=proto%2Fsclpl.git Fixed a memory leak --- diff --git a/source/sclpl/codegen.c b/source/sclpl/codegen.c index 2c91fc1..071a491 100644 --- a/source/sclpl/codegen.c +++ b/source/sclpl/codegen.c @@ -258,5 +258,6 @@ void codegen_csource(FILE* file, vec_t* program) { emit_fn_declarations(funcs); emit_fn_definitions(funcs); emit_toplevel(funcs, program); + mem_release(funcs); emit_footer(); } diff --git a/spec/parser_spec.rb b/spec/parser_spec.rb index 1bda7f6..0e715a0 100644 --- a/spec/parser_spec.rb +++ b/spec/parser_spec.rb @@ -21,7 +21,6 @@ def ast(input) out, err, status = Open3.capture3('./build/bin/sclpl-test', '--ast', :stdin_data => input) raise err unless err == "" raise "Parser command returned non-zero status" unless status.success? - #out.gsub!(//,'\1') out.gsub!(/([()])|tree/,' \1 ') off, expr = re_structure(out.split) expr