From 886ea33b698889a48276ee7d5faf4c3ba26c9c0b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Sat, 18 Jun 2011 17:20:38 +0000 Subject: 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 --- sim/bfin/ChangeLog | 4 ++++ sim/bfin/interp.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'sim/bfin') diff --git a/sim/bfin/ChangeLog b/sim/bfin/ChangeLog index 05ade72..5aab117 100644 --- a/sim/bfin/ChangeLog +++ b/sim/bfin/ChangeLog @@ -1,3 +1,7 @@ +2011-06-18 Mike Frysinger + + * interp.c (sim_create_inferior): Change free to freeargv. + 2011-06-04 Mike Frysinger * machs.c (bf534_dev, bf537_dev): Add glue-or devices. diff --git a/sim/bfin/interp.c b/sim/bfin/interp.c index f8669d3..d0a4e22 100644 --- a/sim/bfin/interp.c +++ b/sim/bfin/interp.c @@ -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); } -- cgit v1.1