asan: readelf leaks
authorAlan Modra <amodra@gmail.com>
Thu, 12 Mar 2020 06:18:07 +0000 (16:48 +1030)
committerAlan Modra <amodra@gmail.com>
Thu, 12 Mar 2020 06:30:40 +0000 (17:00 +1030)
commit8fb879cd16a3e3d1fe93e333c4c720fd33bcc416
tree03efd94bbbe09bef20ca21099f1697ae4bb89274
parentdd69bf7a78a489783c397f2552eeb7999defcb6a
asan: readelf leaks

* readelf.c (process_section_headers): Don't just set
filedata->section_headers NULL, free it first.  Similarly for
dynamic_symbols, dynamic_strings, dynamic_syminfo and
symtab_shndx_list.  Zero associated counts too.
(process_object): Free symtab_shndx_list.
(process_file): Free various allocated filedata tables.
binutils/ChangeLog
binutils/readelf.c