Fixed memory leak
authorRuben Undheim <ruben.undheim@gmail.com>
Sat, 20 Oct 2018 09:57:39 +0000 (11:57 +0200)
committerRuben Undheim <ruben.undheim@gmail.com>
Sat, 20 Oct 2018 09:57:39 +0000 (11:57 +0200)
frontends/ast/ast.cc

index 7600e2912c8f6a800e06f27782c530d9745294ff..1f2ecffde0c479a0b4aa631401574702464036d6 100644 (file)
@@ -1120,6 +1120,7 @@ void AstModule::reprocess_module(RTLIL::Design *design, dict<RTLIL::IdString, RT
 
        // Generate RTLIL from AST for the new module and add to the design:
        AstModule *newmod = process_module(new_ast, false);
+       delete(new_ast);
        design->add(newmod);
        RTLIL::Module* mod = design->module(original_name);
        if (is_top)