aboutsummaryrefslogtreecommitdiff
path: root/sim/bfin/interp.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-18 17:20:38 +0000
committerMike Frysinger <vapier@gentoo.org>2011-06-18 17:20:38 +0000
commit886ea33b698889a48276ee7d5faf4c3ba26c9c0b (patch)
tree86bc4ccbb518b4c13a916f1833926bd7fa22a32b /sim/bfin/interp.c
parent8fb8dca73e98103c67ae0946d200899d7f42df5d (diff)
downloadbinutils-886ea33b698889a48276ee7d5faf4c3ba26c9c0b.zip
binutils-886ea33b698889a48276ee7d5faf4c3ba26c9c0b.tar.gz
binutils-886ea33b698889a48276ee7d5faf4c3ba26c9c0b.tar.bz2
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>
Diffstat (limited to 'sim/bfin/interp.c')
-rw-r--r--sim/bfin/interp.c2
1 files changed, 1 insertions, 1 deletions
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);
}