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:
69141f0
)
macho-o.c don't leak strtab
author
Alan Modra
<amodra@gmail.com>
Tue, 20 Jun 2023 23:51:54 +0000
(09:21 +0930)
committer
Alan Modra
<amodra@gmail.com>
Wed, 21 Jun 2023 06:19:39 +0000
(15:49 +0930)
* mach-o.c (bfd_mach_o_write_symtab_content): Free strtab on
success path.
bfd/mach-o.c
patch
|
blob
|
history
diff --git
a/bfd/mach-o.c
b/bfd/mach-o.c
index 55407fa347d955c8d4bb24d00f8beff80d1adc01..4d414fd95dbe962ec3cfde7f6fb321642604e0e1 100644
(file)
--- a/
bfd/mach-o.c
+++ b/
bfd/mach-o.c
@@
-2073,6
+2073,8
@@
bfd_mach_o_write_symtab_content (bfd *abfd, bfd_mach_o_symtab_command *sym)
if (!_bfd_stringtab_emit (abfd, strtab))
goto err;
+ _bfd_stringtab_free (strtab);
+
/* Pad string table. */
padlen = bfd_mach_o_pad4 (abfd, sym->strsize);
if (padlen < 0)