Fix BFD leak in dwarf2_get_dwz_file.
authorJohn Baldwin <jhb@FreeBSD.org>
Mon, 25 Feb 2019 22:25:01 +0000 (14:25 -0800)
committerJohn Baldwin <jhb@FreeBSD.org>
Mon, 25 Feb 2019 22:25:01 +0000 (14:25 -0800)
commit0f58c9e88ebee636206b946b00ea52b47056b320
tree11bb08dcbd981f5766b74029951e2d1cf573755a
parent0a0f4c0179106ee4b8e56649c549f4175ebba994
Fix BFD leak in dwarf2_get_dwz_file.

Previously if build_id_verify failed, dwz_bfd was cleared to NULL via
release(), but the BFD object was not destroyed.  Use reset() with
nullptr instead to delete the BFD.

gdb/ChangeLog:

* dwarf2read.c (dwarf2_get_dwz_file): Reset dwz_bfd to nullptr
instead of releasing ownership.
gdb/ChangeLog
gdb/dwarf2read.c