]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Free sframe context memory on bfd_close
authorAlan Modra <amodra@gmail.com>
Wed, 11 Feb 2026 05:00:40 +0000 (15:30 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Feb 2026 05:00:40 +0000 (15:30 +1030)
commit9eae5ed721cd117c492fcb4516724bf093d4ea2d
treeb04589e88136c0de2f651f49eaee9b14ae45ba50
parent82861a890114ce7ab1a88325ec133e60afdf2ff6
Free sframe context memory on bfd_close

Call sframe_decoder_free in _bfd_elf_free_cached_info and correct
other calls to sframe_decoder_free so that sfd_info->stf_ctx is
cleared.  If sfd_info->stf_ctx isn't cleared we get double frees.

* elf-sframe.c (sframe_decode): Do not pass local var sfd_ctx
address to sframe_decoder_free, pass the actual context address.
(_bfd_elf_merge_section_sframe): Likewise.
* elf.c: Include sframe-api.h.
(_bfd_elf_free_cached_info): Free sframe info.
bfd/elf-sframe.c
bfd/elf.c