V0.9: Free the iterator if there are extra arguments.
To avoid extra memory usage on error free the iterator if there are extra arguments.
This commit is contained in:
parent
f874e81606
commit
b7b2d710b1
|
|
@ -2,7 +2,7 @@
|
|||
* Verilog-2005 math library for Icarus Verilog
|
||||
* http://www.icarus.com/eda/verilog/
|
||||
*
|
||||
* Copyright (C) 2007-2010 Cary R. (cygcary@yahoo.com)
|
||||
* Copyright (C) 2007-2011 Cary R. (cygcary@yahoo.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -196,6 +196,7 @@ static PLI_INT32 va_single_argument_compiletf(PLI_BYTE8 *ud)
|
|||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
va_error_message(callh, "%s takes only one argument.\n", name);
|
||||
vpi_free_object(argv);
|
||||
}
|
||||
|
||||
/* Get the function that is to be used by the calltf routine. */
|
||||
|
|
@ -285,6 +286,7 @@ static PLI_INT32 va_double_argument_compiletf(PLI_BYTE8 *ud)
|
|||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
va_error_message(callh, "%s takes only two arguments.\n", name);
|
||||
vpi_free_object(argv);
|
||||
}
|
||||
|
||||
/* Get the function that is to be used by the calltf routine. */
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
* Verilog-A math library for Icarus Verilog
|
||||
* http://www.icarus.com/eda/verilog/
|
||||
*
|
||||
* Copyright (C) 2007-2010 Cary R. (cygcary@yahoo.com)
|
||||
* Copyright (C) 2007-2011 Cary R. (cygcary@yahoo.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -223,6 +223,7 @@ static PLI_INT32 va_single_argument_compiletf(PLI_BYTE8 *ud)
|
|||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
va_error_message(callh, "%s takes only one argument.\n", name);
|
||||
vpi_free_object(argv);
|
||||
}
|
||||
|
||||
/* Get the function that is to be used by the calltf routine. */
|
||||
|
|
@ -312,6 +313,7 @@ static PLI_INT32 va_double_argument_compiletf(PLI_BYTE8 *ud)
|
|||
arg = vpi_scan(argv);
|
||||
if (arg != 0) {
|
||||
va_error_message(callh, "%s takes only two arguments.\n", name);
|
||||
vpi_free_object(argv);
|
||||
}
|
||||
|
||||
/* Get the function that is to be used by the calltf routine. */
|
||||
|
|
|
|||
Loading…
Reference in New Issue