Cleanup lxt and lxt2 EOS data.
This patch cleans up the memory allocated in the lxt and lxt2
$dumpvars routines.
(cherry picked from commit be158dd45f)
This commit is contained in:
parent
9fec1f7e45
commit
9ea20d6677
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue