From: tip-bot for Namhyung Kim <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: acme@redhat.com, linux-kernel@vger.kernel.org, paulus@samba.org,
hpa@zytor.com, mingo@kernel.org, jolsa@kernel.org,
a.p.zijlstra@chello.nl, minchan@kernel.org, namhyung.kim@lge.com,
namhyung@kernel.org, jolsa@redhat.com, adrian.hunter@intel.com,
dsahern@gmail.com, tglx@linutronix.de
Subject: [tip:perf/core] perf symbols: Fix a memory leak in vmlinux_path__init()
Date: Thu, 14 Aug 2014 01:45:54 -0700 [thread overview]
Message-ID: <tip-e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2@git.kernel.org> (raw)
In-Reply-To: <1407825645-24586-3-git-send-email-namhyung@kernel.org>
Commit-ID: e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2
Gitweb: http://git.kernel.org/tip/e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2
Author: Namhyung Kim <namhyung@kernel.org>
AuthorDate: Tue, 12 Aug 2014 15:40:34 +0900
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Aug 2014 16:30:22 -0300
perf symbols: Fix a memory leak in vmlinux_path__init()
When uname() failed, it should free vmlinux_path.
Acked-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1407825645-24586-3-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/symbol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 581c568..009a9d0 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1772,7 +1772,7 @@ static int vmlinux_path__init(void)
return 0;
if (uname(&uts) < 0)
- return -1;
+ goto out_fail;
snprintf(bf, sizeof(bf), "/boot/vmlinux-%s", uts.release);
vmlinux_path[vmlinux_path__nr_entries] = strdup(bf);
next prev parent reply other threads:[~2014-08-14 8:46 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 6:40 [PATCHSET 00/13] perf tools: Fix vmlinux search path initialization Namhyung Kim
2014-08-12 6:40 ` [PATCH 01/13] perf script: Fix possible memory leaks Namhyung Kim
2014-08-13 6:21 ` Adrian Hunter
2014-08-13 7:05 ` Namhyung Kim
2014-08-13 19:27 ` Arnaldo Carvalho de Melo
2014-08-14 8:45 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 02/13] perf tools: Fix a memory leak in vmlinux_path__init() Namhyung Kim
2014-08-14 8:45 ` tip-bot for Namhyung Kim [this message]
2014-08-12 6:40 ` [PATCH 03/13] perf annotate: Move session handling out of __cmd_annotate() Namhyung Kim
2014-08-13 11:48 ` Jiri Olsa
2014-08-19 6:03 ` Namhyung Kim
2014-08-14 8:46 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 04/13] perf buildid-cache: Move session handling into cmd_buildid_cache() Namhyung Kim
2014-08-14 8:46 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 05/13] perf inject: Move session handling out of __cmd_inject() Namhyung Kim
2014-08-14 8:46 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 06/13] perf kmem: Move session handling out of __cmd_kmem() Namhyung Kim
2014-08-14 8:46 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 07/13] perf kvm: Move call to symbol__init() after creating session Namhyung Kim
2014-08-14 8:47 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 08/13] perf lock: " Namhyung Kim
2014-08-14 8:47 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 09/13] perf sched: " Namhyung Kim
2014-08-14 8:47 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 10/13] perf script: " Namhyung Kim
2014-08-14 8:47 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 11/13] perf timechart: " Namhyung Kim
2014-08-14 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 12/13] perf trace: " Namhyung Kim
2014-08-14 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-12 6:40 ` [PATCH 13/13] perf tools: Check recorded kernel version when finding vmlinux Namhyung Kim
2014-08-14 8:48 ` [tip:perf/core] " tip-bot for Namhyung Kim
2014-08-13 12:49 ` [PATCHSET 00/13] perf tools: Fix vmlinux search path initialization Jiri Olsa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tip-e96c674fe2c228fd5c16fd7a7607c60dea4cdaa2@git.kernel.org \
--to=tipbot@zytor.com \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=dsahern@gmail.com \
--cc=hpa@zytor.com \
--cc=jolsa@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=minchan@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung.kim@lge.com \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).