[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YSVH8NMZ0OFioBQ9@kernel.org>
Date: Tue, 24 Aug 2021 16:26:40 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Riccardo Mancini <rickyman7@...il.com>
Cc: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>,
Ian Rogers <irogers@...gle.com>,
Namhyung Kim <namhyung@...nel.org>,
Jiri Olsa <jolsa@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...hat.com>,
Jin Yao <yao.jin@...ux.intel.com>, Song Liu <song@...nel.org>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf config: fix caching and memory leak in
perf_home_perfconfig
Em Fri, Aug 20, 2021 at 09:58:16PM +0200, Riccardo Mancini escreveu:
> On Fri, 2021-08-20 at 11:13 -0300, Arnaldo Carvalho de Melo wrote:
> > diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
> > index 63d472b336de21d4..4fb5e90d7a57ae48 100644
> > --- a/tools/perf/util/config.c
> > +++ b/tools/perf/util/config.c
> > @@ -581,7 +581,10 @@ const char *perf_home_perfconfig(void)
> > static const char *config;
> > static bool failed;
> >
> > - config = failed ? NULL : home_perfconfig();
> > + if (failed || config)
> > + return config;
> > +
> > + config = home_perfconfig();
> > if (!config)
> > failed = true;
> >
>
> Looks good to me.
> Shall I resend it fixed?
No need, I'll fix it and apply, thanks for checking!
- Arnaldo
Powered by blists - more mailing lists