[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1485952447-7013-3-git-send-email-treeze.taeung@gmail.com>
Date: Wed, 1 Feb 2017 21:34:05 +0900
From: Taeung Song <treeze.taeung@...il.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: linux-kernel@...r.kernel.org, Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Wang Nan <wangnan0@...wei.com>,
Taeung Song <treeze.taeung@...il.com>
Subject: [PATCH v3 2/4] perf tools: Fill in a lacking part no checking NULL after zalloc() in parse-events.c
Signed-off-by: Taeung Song <treeze.taeung@...il.com>
---
tools/perf/util/parse-events.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 5d90fe7..0c3b81a 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -211,6 +211,8 @@ struct tracepoint_path *tracepoint_id_to_path(u64 config)
closedir(evt_dir);
closedir(sys_dir);
path = zalloc(sizeof(*path));
+ if (!path)
+ return NULL;
path->system = malloc(MAX_EVENT_LENGTH);
if (!path->system) {
free(path);
--
2.7.4
Powered by blists - more mailing lists