debuglink_size &= ~3;
debuglink_size += 4;
- contents = (char *) bfd_malloc (debuglink_size);
+ contents = bfd_malloc (debuglink_size);
if (contents == NULL)
{
/* XXX Should we delete the section from the bfd ? */
bfd_put_32 (abfd, crc32, contents + crc_offset);
- if (! bfd_set_section_contents (abfd, sect, contents, 0, debuglink_size))
- {
- /* XXX Should we delete the section from the bfd ? */
- free (contents);
- return false;
- }
-
- return true;
+ bool ret = bfd_set_section_contents (abfd, sect, contents, 0, debuglink_size);
+ free (contents);
+ return ret;
}
/* Finds the build-id associated with @var{abfd}. If the build-id is