diff options
author | Alan Modra <amodra@gmail.com> | 2023-12-20 08:29:12 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2023-12-20 08:42:37 +1030 |
commit | cf86e13d8bfc2924746b8e45299aed103d090985 (patch) | |
tree | c0eb42e61d8d2045b464ae7a2a0296710708707f /bfd/opncls.c | |
parent | 80d2ef0c44bb56e9de7ca2939643ae5269b9e9eb (diff) | |
download | gdb-cf86e13d8bfc2924746b8e45299aed103d090985.zip gdb-cf86e13d8bfc2924746b8e45299aed103d090985.tar.gz gdb-cf86e13d8bfc2924746b8e45299aed103d090985.tar.bz2 |
Re: PR31145, potential memory leak in binutils/ld
Revert most of this patch, it isn't correct to free the BFD_IN_MEMORY
iostream in io_reinit.
PR 31145
* format.c (io_reinit): Revert last change. Comment.
* opncls.c (_bfd_delete_bfd): Likewise.
Diffstat (limited to 'bfd/opncls.c')
-rw-r--r-- | bfd/opncls.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/bfd/opncls.c b/bfd/opncls.c index e7b3959..32c95d6 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -176,8 +176,6 @@ _bfd_delete_bfd (bfd *abfd) else free ((char *) bfd_get_filename (abfd)); - if ((abfd->flags & BFD_IN_MEMORY) != 0) - free (abfd->iostream); free (abfd->arelt_data); free (abfd); } |