gas: Add md_generic_table_relax_frag
[deliverable/binutils-gdb.git] / bfd / som.c
index 4c9dcaee67673b2e951a208e7fb41b94db8295da..5145651c3d677fa4d4d94feedadbd5f1abc6989b 100644 (file)
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -3309,13 +3309,16 @@ som_write_space_strings (bfd *abfd,
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  char *tmp_space = xmalloc (tmp_space_size);
+  char *tmp_space = bfd_malloc (tmp_space_size);
   char *p = tmp_space;
   unsigned int strings_size = 0;
   asection *section;
   bfd_size_type amt;
   bfd_size_type res;
 
+  if (tmp_space == NULL)
+    return FALSE;
+
   /* Seek to the start of the space strings in preparation for writing
      them out.  */
   if (bfd_seek (abfd, (file_ptr) current_offset, SEEK_SET) != 0)
@@ -3419,12 +3422,15 @@ som_write_symbol_strings (bfd *abfd,
   /* Chunk of memory that we can use as buffer space, then throw
      away.  */
   size_t tmp_space_size = SOM_TMP_BUFSIZE;
-  char *tmp_space = xmalloc (tmp_space_size);
+  char *tmp_space = bfd_malloc (tmp_space_size);
   char *p = tmp_space;
   unsigned int strings_size = 0;
   bfd_size_type amt;
   bfd_size_type res;
 
+  if (tmp_space == NULL)
+    return FALSE;
+
   /* This gets a bit gruesome because of the compilation unit.  The
      strings within the compilation unit are part of the symbol
      strings, but don't have symbol_dictionary entries.  So, manually
This page took 0.025868 seconds and 4 git commands to generate.