Given that as from commit
90e5645309be ("libiberty: Make `objalloc_free'
`free'-like WRT null pointer") `bfd_hash_table_free' now returns with no
action taken when called for a hash table with no allocation present,
remove null pointer checks guarding invocations.
bfd_free_cached_info (abfd);
/* The target _bfd_free_cached_info may not have done anything.. */
- if (abfd->section_htab.memory)
- bfd_hash_table_free (&abfd->section_htab);
+ bfd_hash_table_free (&abfd->section_htab);
if (abfd->memory)
objalloc_free (abfd->memory);
bool
_bfd_free_cached_info (bfd *abfd)
{
- if (abfd->section_htab.memory)
- bfd_hash_table_free (&abfd->section_htab);
+ bfd_hash_table_free (&abfd->section_htab);
abfd->sections = NULL;
abfd->section_last = NULL;
free (info.type_cache.function_types);
free (info.type_cache.reference_types);
free (info.type_cache.struct_types);
- if (info.typedef_hash.table.memory)
- bfd_hash_table_free (&info.typedef_hash.table);
- if (info.strhash.table.memory)
- bfd_hash_table_free (&info.strhash.table);
+ bfd_hash_table_free (&info.typedef_hash.table);
+ bfd_hash_table_free (&info.strhash.table);
return ret;
}