aboutsummaryrefslogtreecommitdiff
path: root/binutils/bucomm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2008-01-09 10:40:32 +0000
committerNick Clifton <nickc@redhat.com>2008-01-09 10:40:32 +0000
commitd25576aadbe87e00dc7702b1d0a9c69c61d511d4 (patch)
treef0d0b5d746e46d0fad652bda2c174561ea64b8f1 /binutils/bucomm.c
parent184d07da89afd7b64fedf2360e9412f3f221b5f8 (diff)
downloadgdb-d25576aadbe87e00dc7702b1d0a9c69c61d511d4.zip
gdb-d25576aadbe87e00dc7702b1d0a9c69c61d511d4.tar.gz
gdb-d25576aadbe87e00dc7702b1d0a9c69c61d511d4.tar.bz2
PR binutils/55326
* bucomm.c (list_supported_architectures): Free architecture list after use. * windres.c (set_endianess): Likewise. * windmc.c (set_endianess): Likewise.
Diffstat (limited to 'binutils/bucomm.c')
-rw-r--r--binutils/bucomm.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/binutils/bucomm.c b/binutils/bucomm.c
index 26cb09e..508790f 100644
--- a/binutils/bucomm.c
+++ b/binutils/bucomm.c
@@ -195,16 +195,18 @@ list_supported_targets (const char *name, FILE *f)
void
list_supported_architectures (const char *name, FILE *f)
{
- const char **arch;
+ const char ** arch;
+ const char ** arches;
if (name == NULL)
fprintf (f, _("Supported architectures:"));
else
fprintf (f, _("%s: supported architectures:"), name);
- for (arch = bfd_arch_list (); *arch; arch++)
+ for (arch = arches = bfd_arch_list (); *arch; arch++)
fprintf (f, " %s", *arch);
fprintf (f, "\n");
+ free (arches);
}
/* The length of the longest architecture name + 1. */