From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-kernel@vger.kernel.org,
Corey Ashford <cjashfor@linux.vnet.ibm.com>,
David Ahern <dsahern@gmail.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
Namhyung Kim <namhyung@kernel.org>,
Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH 3/5] perf tools: Fix wrong condition for allocation failure
Date: Fri, 27 Jun 2014 11:12:41 -0300 [thread overview]
Message-ID: <20140627141240.GG18773@kernel.org> (raw)
In-Reply-To: <1403871661-18474-4-git-send-email-jolsa@kernel.org>
Em Fri, Jun 27, 2014 at 02:20:59PM +0200, Jiri Olsa escreveu:
> Check real allocated pointer for NULL.
Thanks, applied.
- Arnaldo
> Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
> Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
> Cc: David Ahern <dsahern@gmail.com>
> Cc: Frederic Weisbecker <fweisbec@gmail.com>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Paul Mackerras <paulus@samba.org>
> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Link: http://lkml.kernel.org/n/tip-5rfzbalwjphmdzzil74eazyl@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> ---
> tools/perf/builtin-stat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c
> index 65a151e..3e80aa1 100644
> --- a/tools/perf/builtin-stat.c
> +++ b/tools/perf/builtin-stat.c
> @@ -184,7 +184,7 @@ static void perf_evsel__reset_stat_priv(struct perf_evsel *evsel)
> static int perf_evsel__alloc_stat_priv(struct perf_evsel *evsel)
> {
> evsel->priv = zalloc(sizeof(struct perf_stat));
> - if (evsel == NULL)
> + if (evsel->priv == NULL)
> return -ENOMEM;
> perf_evsel__reset_stat_priv(evsel);
> return 0;
> --
> 1.8.3.1
next prev parent reply other threads:[~2014-06-27 14:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-27 12:20 [GIT PULL 0/5] perf/core improvements and fixes Jiri Olsa
2014-06-27 12:20 ` [PATCH 1/5] tools lib traceevent: Fix a risk for doing free on uninitialized pointer Jiri Olsa
2014-06-27 12:20 ` [PATCH 2/5] perf tools powerpc: Adjust callchain based on DWARF debug info Jiri Olsa
2014-06-27 12:20 ` [PATCH 3/5] perf tools: Fix wrong condition for allocation failure Jiri Olsa
2014-06-27 14:12 ` Arnaldo Carvalho de Melo [this message]
2014-06-27 12:21 ` [PATCH 4/5] perf script: Move the number processing into its own function Jiri Olsa
2014-06-27 12:21 ` [PATCH 5/5] perf script: Handle the num array type in python properly Jiri Olsa
2014-07-05 9:30 ` [GIT PULL 0/5] perf/core improvements and fixes Ingo Molnar
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=20140627141240.GG18773@kernel.org \
--to=acme@kernel.org \
--cc=a.p.zijlstra@chello.nl \
--cc=cjashfor@linux.vnet.ibm.com \
--cc=dsahern@gmail.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=paulus@samba.org \
/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).