readelf memory leaks
authorAlan Modra <amodra@gmail.com>
Sun, 19 Apr 2020 07:35:02 +0000 (17:05 +0930)
committerAlan Modra <amodra@gmail.com>
Sun, 19 Apr 2020 22:45:05 +0000 (08:15 +0930)
commitceb9bf11b99f4a1d4a321e6e64c01f34a185cd18
treea68e8ecc157f39ab442a3c25a968321448783de7
parent2efec98b28bbc89fc8e062709c7e28cc8a56ee40
readelf memory leaks

This fixes two leaks found in the new code supporting display of
dynamic symbols retrieved via dynamic tags.

* readelf.c (get_num_dynamic_syms): Formatting.  Don't return
on error without freeing.
(process_dynamic_section): Don't recreate dynamic symbols from
dynamic tag info when the dynamic symbols have already been
read via section headers.
binutils/ChangeLog
binutils/readelf.c