mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-29 10:30:46 +00:00
readelf: replace xmalloc with malloc in slurp_relr_relocs
Using xmalloc makes the null check redundant since failing allocation will exit the program. Instead use malloc and let the error be conveyed up the call chain.
This commit is contained in:
committed by
Jan Beulich
parent
46439c90f2
commit
4491a7c1aa
@@ -1401,7 +1401,7 @@ slurp_relr_relocs (Filedata * filedata,
|
||||
size++;
|
||||
}
|
||||
|
||||
*relrsp = (bfd_vma *) xmalloc (size * sizeof (bfd_vma));
|
||||
*relrsp = (bfd_vma *) malloc (size * sizeof (bfd_vma));
|
||||
if (*relrsp == NULL)
|
||||
{
|
||||
free (relrs);
|
||||
|
||||
Reference in New Issue
Block a user