2009-09-03 Tristan Gingold <gingold@adacore.com>
authorTristan Gingold <gingold@adacore.com>
Thu, 3 Sep 2009 13:20:31 +0000 (13:20 +0000)
committerTristan Gingold <gingold@adacore.com>
Thu, 3 Sep 2009 13:20:31 +0000 (13:20 +0000)
* config/tc-ia64.c (ia64_vms_note): Use lbasename instead of basename.
Call xstrdup on the result and free the buffer after use.

gas/ChangeLog
gas/config/tc-ia64.c

index b0763deb893872ff00e2316fccca9f71c19dc260..b5460ae885149c10cdfac8b1cda1c63141dfd3e9 100644 (file)
@@ -1,3 +1,8 @@
+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.
index f3ca58a49bb5a91112e099989d48f01d4cbcaf88..3a9a74fb87de479e9ccbb52235ac77d273aa507b 100644 (file)
@@ -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");
This page took 0.031054 seconds and 4 git commands to generate.