Don't free a NULL iterator in $dumpvars.
This patch fixes two places where Icarus under certain conditions would try to free a NULL iterator value in $dumpvars(). $dumpvars() can have a NULL argument to indicate that all variables should be dumped. Under two error conditions the code was trying to free this NULL argument reference. The standard does not define if vpi_free_object() can support a NULL reference. Icarus does not currently allow it (it asserts).
This commit is contained in:
parent
e0001de3ba
commit
2da20e8d28
|
|
@ -730,13 +730,13 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name)
|
|||
if (dump_file == 0) {
|
||||
open_dumpfile(callh);
|
||||
if (dump_file == 0) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (install_dumpvars_callback()) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -785,13 +785,13 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name)
|
|||
if (dump_file == 0) {
|
||||
open_dumpfile(callh);
|
||||
if (dump_file == 0) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (install_dumpvars_callback()) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -755,13 +755,13 @@ static PLI_INT32 sys_dumpvars_calltf(PLI_BYTE8*name)
|
|||
if (dump_file == 0) {
|
||||
open_dumpfile(callh);
|
||||
if (dump_file == 0) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (install_dumpvars_callback()) {
|
||||
vpi_free_object(argv);
|
||||
if (argv) vpi_free_object(argv);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue