diff --git a/vpi/sys_lxt.c b/vpi/sys_lxt.c index 1db04ccf7..c87ee4d58 100644 --- a/vpi/sys_lxt.c +++ b/vpi/sys_lxt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2002-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -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; } diff --git a/vpi/sys_lxt2.c b/vpi/sys_lxt2.c index 511accba1..243f386c0 100644 --- a/vpi/sys_lxt2.c +++ b/vpi/sys_lxt2.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 2003-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -741,13 +741,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; } diff --git a/vpi/sys_vcd.c b/vpi/sys_vcd.c index 10465c668..18f2a5fe9 100644 --- a/vpi/sys_vcd.c +++ b/vpi/sys_vcd.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2009 Stephen Williams (steve@icarus.com) + * Copyright (c) 1999-2010 Stephen Williams (steve@icarus.com) * * This source code is free software; you can redistribute it * and/or modify it in source code form under the terms of the GNU @@ -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; }