projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Automatic date update in version.in
[deliverable/binutils-gdb.git]
/
bfd
/
elf64-sparc.c
diff --git
a/bfd/elf64-sparc.c
b/bfd/elf64-sparc.c
index 4addaf052a2052198c5cdd6ff7785d7046f60fd2..8d352252b63aba8278f8764f5e4d746e1edf5b5e 100644
(file)
--- a/
bfd/elf64-sparc.c
+++ b/
bfd/elf64-sparc.c
@@
-79,13
+79,11
@@
elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect,
bfd_size_type count;
arelent *relents;
bfd_size_type count;
arelent *relents;
- allocated = bfd_malloc (rel_hdr->sh_size);
+ if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0)
+ return FALSE;
+ allocated = _bfd_malloc_and_read (abfd, rel_hdr->sh_size, rel_hdr->sh_size);
if (allocated == NULL)
if (allocated == NULL)
- goto error_return;
-
- if (bfd_seek (abfd, rel_hdr->sh_offset, SEEK_SET) != 0
- || bfd_bread (allocated, rel_hdr->sh_size, abfd) != rel_hdr->sh_size)
- goto error_return;
+ return FALSE;
native_relocs = (bfd_byte *) allocated;
native_relocs = (bfd_byte *) allocated;
@@
-163,14
+161,11
@@
elf64_sparc_slurp_one_reloc_table (bfd *abfd, asection *asect,
canon_reloc_count (asect) += relent - relents;
canon_reloc_count (asect) += relent - relents;
- if (allocated != NULL)
- free (allocated);
-
+ free (allocated);
return TRUE;
error_return:
return TRUE;
error_return:
- if (allocated != NULL)
- free (allocated);
+ free (allocated);
return FALSE;
}
return FALSE;
}
This page took
0.027508 seconds
and
4
git commands to generate.