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, 7 Jul 2013 14:43:27 -0600 From: David Ahern <dsahern@...il.com> To: acme@...stprotocols.net, linux-kernel@...r.kernel.org Cc: David Ahern <dsahern@...il.com>, Andi Kleen <ak@...ux.intel.com> Subject: [PATCH] perf: Free memory allocated in parse_events_fixup 578d9c6 added a memory allocation that is not freed. Do that when the scanner is done. Signed-off-by: David Ahern <dsahern@...il.com> Cc: Andi Kleen <ak@...ux.intel.com> --- tools/perf/util/parse-events.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index 2c460ed..707368f 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c @@ -846,7 +846,9 @@ static int parse_events_fixup(int ret, const char *str, void *data, free(o); if (!s) return -ENOMEM; - return parse_events__scanner(s, data, start_token); + ret = parse_events__scanner(s, data, start_token); + free(s); + return ret; } static int parse_events__scanner(const char *str, void *data, int start_token) -- 1.7.10.1 -- 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