free_external = (bfd_byte *) malloc (sec->reloc_count * relsz);
free_external = (bfd_byte *) bfd_malloc (sec->reloc_count * relsz);
_bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,				require_internal, internal_relocs)     bfd *abfd;     asection *sec;     boolean cache;     bfd_byte *external_relocs;     boolean require_internal;     struct internal_reloc *internal_relocs;{  bfd_size_type relsz;  bfd_byte *free_external = NULL;  struct internal_reloc *free_internal = NULL;  bfd_byte *erel;  bfd_byte *erel_end;  struct internal_reloc *irel;  if (coff_section_data (abfd, sec) != NULL      && coff_section_data (abfd, sec)->relocs != NULL)    {      if (! require_internal)	return coff_section_data (abfd, sec)->relocs;      memcpy (internal_relocs, coff_section_data (abfd, sec)->relocs,	      sec->reloc_count * sizeof (struct internal_reloc));      return internal_relocs;    }  relsz = bfd_coff_relsz (abfd);  if (external_relocs == NULL)    {      free_external = (bfd_byte *) malloc (sec->reloc_count * relsz);      if (free_external == NULL && sec->reloc_count > 0)	{	  bfd_set_error (bfd_error_no_memory);	  goto error_return;	}      external_relocs = free_external;    }  if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0      || (bfd_read (external_relocs, relsz, sec->reloc_count, abfd)	  != relsz * sec->reloc_count))    goto error_return;  if (internal_relocs == NULL)    {      free_internal = ((struct internal_reloc *)		       malloc (sec->reloc_count			       * sizeof (struct internal_reloc)));      if (free_internal == NULL && sec->reloc_count > 0)	{	  bfd_set_error (bfd_error_no_memory);	  goto error_return;	}      internal_relocs = free_internal;    }  /* Swap in the relocs.  */  erel = external_relocs;  erel_end = erel + relsz * sec->reloc_count;  irel = internal_relocs;  for (; erel < erel_end; erel += relsz, irel++)    bfd_coff_swap_reloc_in (abfd, (PTR) erel, (PTR) irel);  if (free_external != NULL)    {      free (free_external);      free_external = NULL;    }  if (cache && free_internal != NULL)    {      if (coff_section_data (abfd, sec) == NULL)	{	  sec->used_by_bfd =	    (PTR) bfd_zalloc (abfd,			      sizeof (struct coff_section_tdata));	  if (sec->used_by_bfd == NULL)	    {	      bfd_set_error (bfd_error_no_memory);	      goto error_return;	    }	  coff_section_data (abfd, sec)->contents = NULL;	}      coff_section_data (abfd, sec)->relocs = free_internal;    }  return internal_relocs; error_return:  if (free_external != NULL)    free (free_external);  if (free_internal != NULL)    free (free_internal);  return NULL;}