sim: Call freeargv() when failure occurs
After successfully call buildargv(), the code need to be sure of calling freeargv() in any cases. 2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com> * common/sim-options.c (sim_args_command): Call freeargv() when failure occurs.
This commit is contained in:
parent
24dd580891
commit
c9ba137e21
|
@ -1,3 +1,8 @@
|
|||
2015-02-02 Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
|
||||
* common/sim-options.c (sim_args_command): Call freeargv() when
|
||||
failure occurs.
|
||||
|
||||
2014-07-01 Chen Gang <gang.chen.5i5j@gmail.com>
|
||||
|
||||
* sim/microblaze/interp.c: Use long int format instead of int
|
||||
|
|
|
@ -993,7 +993,10 @@ sim_args_command (SIM_DESC sd, const char *cmd)
|
|||
sim_cpu *cpu;
|
||||
|
||||
if (argv [0] == NULL)
|
||||
{
|
||||
freeargv (argv);
|
||||
return SIM_RC_OK; /* FIXME - perhaps help would be better */
|
||||
}
|
||||
|
||||
/* First check for a cpu selector. */
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue