Fix: "Possible Memory leak in bed hash.c"
* elf-strtab.c (_bfd_elf_strtab_init): In the event of memory allocation failure, make sure that the hash table is freed.
This commit is contained in:
parent
bc92a20a84
commit
452855278a
@ -1,3 +1,8 @@
|
||||
2023-09-13 Alan Modra <amodra@gmail.com>
|
||||
|
||||
* elf-strtab.c (_bfd_elf_strtab_init): In the event of memory
|
||||
allocation failure, make sure that the hash table is freed.
|
||||
|
||||
2023-08-30 Tom Tromey <tom@tromey.com>
|
||||
|
||||
PR binutils/30703
|
||||
|
@ -116,6 +116,7 @@ _bfd_elf_strtab_init (void)
|
||||
bfd_malloc (table->alloced * amt));
|
||||
if (table->array == NULL)
|
||||
{
|
||||
bfd_hash_table_free (&table->table);
|
||||
free (table);
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user