summaryrefslogtreecommitdiff
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
commita0515286bfc5c10baebfd43550722623fb2aefdd (patch)
tree364414f673c2caf96370cb8b4055e29e3d30b7f6 /binutils/bucomm.c
parentc5fc963df621a41e7e27f1d97462acd138bd6c42 (diff)
downloadbinutils-redhat-a0515286bfc5c10baebfd43550722623fb2aefdd.tar.gz
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 26cb09efb4..508790ffa3 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. */