gas: avoid spurious failures in non-ELF targets in the SPARC testsuite.
[deliverable/binutils-gdb.git] / bfd / pei-x86_64.c
index aa90b6fa7b4bc8b72772e57c8583c8fb574d6585..c19b9461ada77943f2b8907e7638f665e439bb8d 100644 (file)
@@ -602,7 +602,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
   if (strcmp (pdata_section->name, ".pdata") != 0)
     {
       size_t len = strlen (pdata_section->name);
-      char *xdata_name = alloca (len + 1);
+      char *xdata_name = xmalloc (len + 1);
 
       xdata_name = memcpy (xdata_name, pdata_section->name, len + 1);
       /* Transform .pdata prefix into .xdata prefix.  */
@@ -610,6 +610,7 @@ pex64_bfd_print_pdata_section (bfd *abfd, void *vfile, asection *pdata_section)
        xdata_name [1] = 'x';
       xdata_section = pex64_get_section_by_rva (abfd, xdata_base,
                                                xdata_name);
+      free (xdata_name);
     }
   /* Second, try the .xdata section itself.  */
   if (!xdata_section)
This page took 0.024965 seconds and 4 git commands to generate.