[PATCH] sim: bfin: use freeargv for freeing argvs
Mike Frysinger
vapier@gentoo.org
Sat Jun 18 17:19:00 GMT 2011
Since the argv array was allocated with dupargv, it needs to be freed
with freeargv to avoid leaks.
Committed.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-06-18 Mike Frysinger <vapier@gentoo.org>
* interp.c (sim_create_inferior): Change free to freeargv.
---
sim/bfin/interp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c
index 7ae05f0..9a88bee 100644
--- a/sim/bfin/interp.c
+++ b/sim/bfin/interp.c
@@ -1245,7 +1245,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);
}
--
1.7.5.3
More information about the Gdb-patches
mailing list