Cleanup lxt and lxt2 EOS data.

This patch cleans up the memory allocated in the lxt and lxt2
$dumpvars routines.
This commit is contained in:
Cary R 2009-03-17 18:01:25 -07:00 committed by Stephen Williams
parent fa8a3d6c2e
commit be158dd45f
3 changed files with 27 additions and 0 deletions

View File

@ -297,6 +297,8 @@ static PLI_INT32 dumpvars_cb(p_cb_data cause)
static PLI_INT32 finish_cb(p_cb_data cause)
{
struct vcd_info *cur, *next;
if (finish_status != 0) return 0;
finish_status = 1;
@ -306,6 +308,17 @@ static PLI_INT32 finish_cb(p_cb_data cause)
lt_set_time64(dump_file, dumpvars_time);
}
for (cur = vcd_list ; cur ; cur = next) {
next = cur->next;
free(cur);
}
vcd_list = 0;
vcd_names_delete(&lxt_tab);
nexus_ident_delete();
free(dump_path);
dump_path = 0;
return 0;
}

View File

@ -299,6 +299,8 @@ static PLI_INT32 dumpvars_cb(p_cb_data cause)
static PLI_INT32 finish_cb(p_cb_data cause)
{
struct vcd_info *cur, *next;
if (finish_status != 0) return 0;
finish_status = 1;
@ -308,6 +310,17 @@ static PLI_INT32 finish_cb(p_cb_data cause)
lxt2_wr_set_time64(dump_file, dumpvars_time);
}
for (cur = vcd_list ; cur ; cur = next) {
next = cur->next;
free(cur);
}
vcd_list = 0;
vcd_names_delete(&lxt_tab);
nexus_ident_delete();
free(dump_path);
dump_path = 0;
return 0;
}

View File

@ -264,6 +264,7 @@ static PLI_INT32 finish_cb(p_cb_data cause)
free((char *)cur->ident);
free(cur);
}
vcd_list = 0;
vcd_names_delete(&vcd_tab);
vcd_names_delete(&vcd_var);
nexus_ident_delete();