addr2line: fix allocation leak in error path

CID:		1437677
Reported by:	Coverity Scan
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2020-12-03 14:41:11 +00:00
parent b946eede04
commit 67b94fc58e

View File

@ -491,6 +491,7 @@ check_labels(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Unsigned addr,
if (dwarf_tag(prev_die, &tag, &de) != DW_DLV_OK) {
warnx("dwarf_tag failed: %s",
dwarf_errmsg(de));
free(labels);
return DW_DLV_ERROR;
}
if (tag == DW_TAG_label) {