* macho-o.c don't leak strtab
@ 2023-06-21 6:20 Alan Modra
0 siblings, 0 replies; only message in thread
From: Alan Modra @ 2023-06-21 6:20 UTC (permalink / raw)
To: binutils
* mach-o.c (bfd_mach_o_write_symtab_content): Free strtab on
success path.
diff --git a/bfd/mach-o.c b/bfd/mach-o.c
index 55407fa347d..4d414fd95db 100644
--- 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)
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-06-21 6:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-21 6:20 macho-o.c don't leak strtab Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).