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.
+2022-06-22 Marcus Nilsson <brainbomb@gmail.com>
+
+ * readelf.c: (slurp_relr_relocs) Use malloc instead of xmalloc
+ when allocating space for relocations.
+
2022-06-21 Kumar N, Bhuvanendra via Binutils <Kavitha.Natarajan@amd.com>
* dwarf.h (struct debug_info): Add rnglists_base field.
size++;
}
- *relrsp = (bfd_vma *) xmalloc (size * sizeof (bfd_vma));
+ *relrsp = (bfd_vma *) malloc (size * sizeof (bfd_vma));
if (*relrsp == NULL)
{
free (relrs);