Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Dec 2020 14:41:11 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368302 - head/contrib/elftoolchain/addr2line
Message-ID:  <202012031441.0B3EfBkK015423@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Dec  3 14:41:11 2020
New Revision: 368302
URL: https://svnweb.freebsd.org/changeset/base/368302

Log:
  addr2line: fix allocation leak in error path
  
  CID:		1437677
  Reported by:	Coverity Scan
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/contrib/elftoolchain/addr2line/addr2line.c

Modified: head/contrib/elftoolchain/addr2line/addr2line.c
==============================================================================
--- head/contrib/elftoolchain/addr2line/addr2line.c	Thu Dec  3 14:04:42 2020	(r368301)
+++ head/contrib/elftoolchain/addr2line/addr2line.c	Thu Dec  3 14:41:11 2020	(r368302)
@@ -491,6 +491,7 @@ check_labels(Dwarf_Debug dbg, Dwarf_Die die, Dwarf_Uns
 		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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012031441.0B3EfBkK015423>