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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=368302

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) {