libdwfl: Fix memory leak in link_map.c dwfl_link_map_report.

The phdrs buffer could come from the core file or through the executable.
dwfl_link_map_report would leak the buffer if it came from the executable.
Track where the buffer came from and free appropriately.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
2 files changed