sim: bfin: use freeargv for freeing argvs
Since the argv array was allocated with dupargv, it needs to be freed with freeargv to avoid leaks. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
8fb8dca73e
commit
886ea33b69
2 changed files with 5 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
2011-06-18 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* interp.c (sim_create_inferior): Change free to freeargv.
|
||||
|
||||
2011-06-04 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* machs.c (bf534_dev, bf537_dev): Add glue-or devices.
|
||||
|
|
|
@ -1222,7 +1222,7 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd,
|
|||
'target sim' with `bfin-...-gdb`), we need to handle it. */
|
||||
if (STATE_OPEN_KIND (sd) == SIM_OPEN_DEBUG)
|
||||
{
|
||||
free (STATE_PROG_ARGV (sd));
|
||||
freeargv (STATE_PROG_ARGV (sd));
|
||||
STATE_PROG_ARGV (sd) = dupargv (argv);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue