All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: "Gustavo A. R. Silva" <gustavo@embeddedor.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>,
	Andi Kleen <ak@linux.intel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf script: Fix memory leaks in list_scripts()
Date: Mon, 26 Aug 2019 11:07:55 -0300	[thread overview]
Message-ID: <20190826140755.GC24801@kernel.org> (raw)
In-Reply-To: <da724a58-56f3-e68a-c1db-6e9cb1ee8155@embeddedor.com>

Em Sun, Aug 25, 2019 at 11:06:25PM -0500, Gustavo A. R. Silva escreveu:
> Hi all,
> 
> Friendly ping (second one after 4 months):
> 
> Who can take this?

Sorry for the delay, finally applied, thanks!

- Arnaldo
 
> Thanks
> --
> Gustavo
> 
> On 4/22/19 10:14 AM, Gustavo A. R. Silva wrote:
> > Hi all,
> > 
> > Friendly ping:
> > 
> > Who can take this?
> > 
> > Thanks
> > 
> > On 4/8/19 11:27 AM, Gustavo A. R. Silva wrote:
> >> In case memory resources for *buf* and *paths* were allocated,
> >> jump to *out* and release them before return.
> >>
> >> Addresses-Coverity-ID: 1444328 ("Resource leak")
> >> Fixes: 6f3da20e151f ("perf report: Support builtin perf script in scripts menu")
> >> Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
> >> ---
> >>  tools/perf/ui/browsers/scripts.c | 6 ++++--
> >>  1 file changed, 4 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/tools/perf/ui/browsers/scripts.c b/tools/perf/ui/browsers/scripts.c
> >> index 27cf3ab88d13..f4edb18f67ec 100644
> >> --- a/tools/perf/ui/browsers/scripts.c
> >> +++ b/tools/perf/ui/browsers/scripts.c
> >> @@ -131,8 +131,10 @@ static int list_scripts(char *script_name, bool *custom,
> >>  		int key = ui_browser__input_window("perf script command",
> >>  				"Enter perf script command line (without perf script prefix)",
> >>  				script_args, "", 0);
> >> -		if (key != K_ENTER)
> >> -			return -1;
> >> +		if (key != K_ENTER) {
> >> +			ret = -1;
> >> +			goto out;
> >> +		}
> >>  		sprintf(script_name, "%s script %s", perf, script_args);
> >>  	} else if (choice < num + max_std) {
> >>  		strcpy(script_name, paths[choice]);
> >>

-- 

- Arnaldo

  reply	other threads:[~2019-08-26 14:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-08 16:27 [PATCH] perf script: Fix memory leaks in list_scripts() Gustavo A. R. Silva
2019-04-22 15:14 ` Gustavo A. R. Silva
2019-08-26  4:06   ` Gustavo A. R. Silva
2019-08-26 14:07     ` Arnaldo Carvalho de Melo [this message]
2019-08-26 15:59       ` Gustavo A. R. Silva
     [not found] ` <156689437793.24518.1210962260082729908.tip-bot2@tip-bot2>
2019-08-27 16:12   ` [tip: perf/core] " Gustavo A. R. Silva
2019-08-27 21:45     ` Andi Kleen

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=20190826140755.GC24801@kernel.org \
    --to=arnaldo.melo@gmail.com \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=gustavo@embeddedor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.