projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc92a20
)
Fix: "Possible Memory leak in bed hash.c"
author
Alan Modra
<amodra@gmail.com>
Wed, 13 Sep 2023 10:38:33 +0000
(11:38 +0100)
committer
Nick Clifton
<nickc@redhat.com>
Wed, 13 Sep 2023 10:38:33 +0000
(11:38 +0100)
* elf-strtab.c (_bfd_elf_strtab_init): In the event of memory allocation failure, make sure that the hash table is freed.
bfd/ChangeLog
patch
|
blob
|
history
bfd/elf-strtab.c
patch
|
blob
|
history
diff --git
a/bfd/ChangeLog
b/bfd/ChangeLog
index 8b478cbedcbdf174b96b4a68644c9b9ca4957334..20dd6ba9e8e33ca57b5125beb4cc4dc16ef081e2 100644
(file)
--- a/
bfd/ChangeLog
+++ b/
bfd/ChangeLog
@@
-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
diff --git
a/bfd/elf-strtab.c
b/bfd/elf-strtab.c
index 5de5af73bb44bd49db5208f96be50fddf060f767..d52a3079f4c93412a9ff88c27fee905bafe6779f 100644
(file)
--- a/
bfd/elf-strtab.c
+++ b/
bfd/elf-strtab.c
@@
-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;
}