diff options
author | Alan Modra <amodra@gmail.com> | 2025-01-18 10:55:22 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2025-01-18 10:58:17 +1030 |
commit | 26dd9cb647140db87a5a530fd9f044d356e081de (patch) | |
tree | bf029ace010bc040341ed569c2b7fe6d6cbde53c | |
parent | 5d6142b571fc676821c8c9a1093dcfd10c3e1955 (diff) | |
download | gdb-26dd9cb647140db87a5a530fd9f044d356e081de.zip gdb-26dd9cb647140db87a5a530fd9f044d356e081de.tar.gz gdb-26dd9cb647140db87a5a530fd9f044d356e081de.tar.bz2 |
Re: binary outsymbols
The "of course to free outsymbols" turned out to be wrong. outsymbols
belongs to objcopy which frees them, so commit 6ca01b0bdd59 introduced
a double free.
* srec.c (srec_write_symbols): Don't free outsymbols.
* tekhex.c (tekhex_write_object_contents): Likewise.
-rw-r--r-- | bfd/srec.c | 4 | ||||
-rw-r--r-- | bfd/tekhex.c | 4 |
2 files changed, 0 insertions, 8 deletions
@@ -1114,13 +1114,9 @@ srec_write_symbols (bfd *abfd) goto fail; } - free (abfd->outsymbols); - abfd->outsymbols = NULL; return true; fail: - free (abfd->outsymbols); - abfd->outsymbols = NULL; return false; } diff --git a/bfd/tekhex.c b/bfd/tekhex.c index ef2bb25..aab0b2f 100644 --- a/bfd/tekhex.c +++ b/bfd/tekhex.c @@ -886,13 +886,9 @@ tekhex_write_object_contents (bfd *abfd) /* And the terminator. */ if (bfd_write ("%0781010\n", 9, abfd) != 9) goto fail; - free (abfd->outsymbols); - abfd->outsymbols = NULL; return true; fail: - free (abfd->outsymbols); - abfd->outsymbols = NULL; return false; } |