diff options
author | Alan Modra <amodra@gmail.com> | 2022-12-21 21:40:12 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2022-12-22 07:03:07 +1030 |
commit | d28fbc7197ba0e021a43f873eff90b05dcdcff6a (patch) | |
tree | 7957b5ecb763fec5d5822917c84dfb376ec4af9f /libsframe | |
parent | f7cb9bba3d5d8dc10d4cccc42c67a4ba33820ddc (diff) | |
download | binutils-gdb-d28fbc7197ba0e021a43f873eff90b05dcdcff6a.tar.gz |
PR29925, Memory leak in find_abstract_instance
The testcase in the PR had a variable with both DW_AT_decl_file and
DW_AT_specification, where the DW_AT_specification also specified
DW_AT_decl_file. This leads to a memory leak as the file name is
malloced and duplicates are not expected.
I've also changed find_abstract_instance to not use a temp for "name",
because that can result in a change in behaviour from the usual last
of duplicate attributes wins.
PR 29925
* dwarf2.c (find_abstract_instance): Delete "name" variable.
Free *filename_ptr before assigning new file name.
(scan_unit_for_symbols): Similarly free func->file and
var->file before assigning.
Diffstat (limited to 'libsframe')
0 files changed, 0 insertions, 0 deletions