mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-21 02:24:17 +08:00
bfd: Check NULL pointer before setting ref_real
PR ld/29086 * linker.c (bfd_wrapped_link_hash_lookup): Check NULL pointer before setting ref_real.
This commit is contained in:
@ -599,6 +599,7 @@ bfd_wrapped_link_hash_lookup (bfd *abfd,
|
|||||||
n[1] = '\0';
|
n[1] = '\0';
|
||||||
strcat (n, l + sizeof REAL - 1);
|
strcat (n, l + sizeof REAL - 1);
|
||||||
h = bfd_link_hash_lookup (info->hash, n, create, true, follow);
|
h = bfd_link_hash_lookup (info->hash, n, create, true, follow);
|
||||||
|
if (h != NULL)
|
||||||
h->ref_real = 1;
|
h->ref_real = 1;
|
||||||
free (n);
|
free (n);
|
||||||
return h;
|
return h;
|
||||||
|
Reference in New Issue
Block a user