aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2002-11-05 21:53:13 +0000
committerH.J. Lu <hjl.tools@gmail.com>2002-11-05 21:53:13 +0000
commitaa3d8fdff80e2f60b1f7c48f94545fd292b22c90 (patch)
treed5d9297745e831d8432f1aa4d6563269af76e428
parenta216a322341d49ebb6eff80fe9a49542b545c7d0 (diff)
downloadgdb-aa3d8fdff80e2f60b1f7c48f94545fd292b22c90.zip
gdb-aa3d8fdff80e2f60b1f7c48f94545fd292b22c90.tar.gz
gdb-aa3d8fdff80e2f60b1f7c48f94545fd292b22c90.tar.bz2
2002-11-05 H.J. Lu <hjl@gnu.org>
* config/tc-mips.c (support_64bit_objects): Check *l before it is freed.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-mips.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 62a457c..85da823 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-05 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (support_64bit_objects): Check *l before it
+ is freed.
+
2002-11-04 Danny Smith <dannysmith@users.sourceforge.net>
* config/obj-coff.c (obj-coff-section): Set SEC_DATA and
diff --git a/gas/config/tc-mips.c b/gas/config/tc-mips.c
index 329d1a4..717078f 100644
--- a/gas/config/tc-mips.c
+++ b/gas/config/tc-mips.c
@@ -10161,6 +10161,7 @@ md_number_to_chars (buf, val, n)
static int support_64bit_objects(void)
{
const char **list, **l;
+ int yes;
list = bfd_target_list ();
for (l = list; *l != NULL; l++)
@@ -10173,8 +10174,9 @@ static int support_64bit_objects(void)
|| strcmp (*l, "elf64-littlemips") == 0)
#endif
break;
+ yes = (*l != NULL);
free (list);
- return (*l != NULL);
+ return yes;
}
#endif /* OBJ_ELF */