lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Sun, 14 Aug 2011 15:39:31 GMT From: tip-bot for Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> To: linux-tip-commits@...r.kernel.org Cc: acme@...hat.com, linux-kernel@...r.kernel.org, paulus@...ba.org, hpa@...or.com, mingo@...hat.com, peterz@...radead.org, penberg@...nel.org, masami.hiramatsu.pt@...achi.com, fweisbec@...il.com, tglx@...utronix.de, mingo@...e.hu Subject: [tip:perf/core] perf probe: Fix a memory leak for scopes array Commit-ID: 8afa2a707d3d1320df5d35966729ac5262da737d Gitweb: http://git.kernel.org/tip/8afa2a707d3d1320df5d35966729ac5262da737d Author: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> AuthorDate: Thu, 11 Aug 2011 20:02:29 +0900 Committer: Arnaldo Carvalho de Melo <acme@...hat.com> CommitDate: Fri, 12 Aug 2011 09:21:15 -0300 perf probe: Fix a memory leak for scopes array Fix a memory leak for scopes array when it finds a variable in the global scope. Reviewed-by: Pekka Enberg <penberg@...nel.org> Cc: Frederic Weisbecker <fweisbec@...il.com> Cc: Ingo Molnar <mingo@...e.hu> Cc: Paul Mackerras <paulus@...ba.org> Cc: Pekka Enberg <penberg@...nel.org> Cc: Peter Zijlstra <peterz@...radead.org> Cc: yrl.pp-manager.tt@...achi.com Link: http://lkml.kernel.org/r/20110811110229.19900.63019.stgit@fedora15 Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com> --- tools/perf/util/probe-finder.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c index 3e44a3e..573c723 100644 --- a/tools/perf/util/probe-finder.c +++ b/tools/perf/util/probe-finder.c @@ -660,6 +660,7 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf) else { /* Search upper class */ nscopes = dwarf_getscopes_die(sp_die, &scopes); + ret = -ENOENT; while (nscopes-- > 1) { pr_debug("Searching variables in %s\n", dwarf_diename(&scopes[nscopes])); @@ -668,14 +669,12 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf) pf->pvar->var, 0, &vr_die)) { ret = convert_variable(&vr_die, pf); - goto found; + break; } } if (scopes) free(scopes); - ret = -ENOENT; } -found: if (ret < 0) pr_warning("Failed to find '%s' in this function.\n", pf->pvar->var); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists