Fix memory leak

This commit is contained in:
Nick Gasson 2008-06-27 12:29:50 +01:00
parent 301a25303f
commit f800298d01
1 changed files with 3 additions and 4 deletions

View File

@ -410,17 +410,16 @@ int draw_function(ivl_scope_t scope, ivl_scope_t parent)
case IVL_SIP_OUTPUT:
// The magic variable Verilog_Result holds the return value
signame = "Verilog_Result";
func->set_type(sigtype);
func->set_type(new vhdl_type(*sigtype));
default:
func->get_scope()->add_decl
(new vhdl_var_decl(signame.c_str(), new vhdl_type(*sigtype)));
(new vhdl_var_decl(signame.c_str(), sigtype));
}
remember_signal(sig, func->get_scope());
rename_signal(sig, signame);
}
// Non-blocking assignment not allowed in functions
func->get_scope()->set_allow_signal_assignment(false);