]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Free sframe encoder context
authorAlan Modra <amodra@gmail.com>
Wed, 11 Feb 2026 05:01:33 +0000 (15:31 +1030)
committerAlan Modra <amodra@gmail.com>
Wed, 11 Feb 2026 05:01:33 +0000 (15:31 +1030)
commit3949fb481a6739dc1f4dc5fad09d7646c90af3d2
tree935527ce9418cd6134ed2e8fac36cdc2f3168f58
parent9eae5ed721cd117c492fcb4516724bf093d4ea2d
Free sframe encoder context

Like the patch to free sframe decoder data, this also needs to ensure
the function doing the free is passed the actual context address.

bfd/
* elf-sframe.c (_bfd_elf_write_section_sframe): Don't pass
address of local var to sframe_encoder_free, pass the actual
context address.
* elf64-s390.c (elf_s390_link_hash_table_free): New function.
(elf_s390_link_hash_table_create): Set hash_table_free.  Tidy
zmalloc call.
(_bfd_s390_elf_write_sframe_plt): Don't pass address of local
var to sframe_encoder_free, pass the actual context address.
* elflink.c: Include sframe-api.h.
(_bfd_elf_link_hash_table_free): Free sframe encoder data.
* elfxx-x86.c (elf_x86_link_hash_table_free): Likewise.
(_bfd_x86_elf_write_sframe_plt): Don't pass address of local
var to sframe_encoder_free, pass the actual context address.
libsframe/
* sframe.c (sframe_encode): Free context on error return path.
bfd/elf-sframe.c
bfd/elf64-s390.c
bfd/elflink.c
bfd/elfxx-x86.c
libsframe/sframe.c