aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2009-09-03 13:20:31 +0000
committerTristan Gingold <gingold@adacore.com>2009-09-03 13:20:31 +0000
commita0840211ed96ee66f79657c1167106d5d5aa0c68 (patch)
tree650262cb07492fd0b3c1bac602a0020e1dd8abfb /gas
parent5bc2ed935e6774432692a34f0e2325bbdf57be01 (diff)
downloadgdb-a0840211ed96ee66f79657c1167106d5d5aa0c68.zip
gdb-a0840211ed96ee66f79657c1167106d5d5aa0c68.tar.gz
gdb-a0840211ed96ee66f79657c1167106d5d5aa0c68.tar.bz2
2009-09-03 Tristan Gingold <gingold@adacore.com>
* config/tc-ia64.c (ia64_vms_note): Use lbasename instead of basename. Call xstrdup on the result and free the buffer after use.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-ia64.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b0763de..b5460ae 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2009-09-03 Tristan Gingold <gingold@adacore.com>
+ * config/tc-ia64.c (ia64_vms_note): Use lbasename instead of basename.
+ Call xstrdup on the result and free the buffer after use.
+
+2009-09-03 Tristan Gingold <gingold@adacore.com>
+
* as.h (__PRETTY_FUNCTION__): Use the same definition as bfd/libbfd.h.
2009-09-02 Jie Zhang <jie.zhang@analog.com>
diff --git a/gas/config/tc-ia64.c b/gas/config/tc-ia64.c
index f3ca58a..3a9a74f 100644
--- a/gas/config/tc-ia64.c
+++ b/gas/config/tc-ia64.c
@@ -11667,7 +11667,7 @@ ia64_vms_note (void)
subsegT subseg = now_subseg;
Elf_Internal_Note i_note;
asection *secp = NULL;
- char *basec, *bname;
+ char *bname;
char buf [256];
symbolS *sym;
@@ -11679,8 +11679,7 @@ ia64_vms_note (void)
SEC_HAS_CONTENTS | SEC_READONLY);
/* Module header note. */
- basec = xstrdup (out_file_name);
- bname = basename (basec);
+ bname = xstrdup (lbasename (out_file_name));
if ((p = strrchr (bname, '.')))
*p = '\0';
@@ -11709,6 +11708,7 @@ ia64_vms_note (void)
p = frag_more (strlen (bname) + 1);
strcpy (p, bname);
+ free (bname);
p = frag_more (5);
strcpy (p, "V1.0");