Re: [PATCH] perf expr: Fix memory leaks in metric bison

2020-05-13 Thread Arnaldo Carvalho de Melo
Em Wed, May 13, 2020 at 07:52:53PM +0200, Jiri Olsa escreveu: > On Tue, May 12, 2020 at 05:03:18PM -0700, Ian Rogers wrote: > > Add a destructor for strings to reclaim memory in the event of errors. > > Free the ID given for a lookup, it was previously strdup-ed in the lex > > code. > > > > Review

Re: [PATCH] perf expr: Fix memory leaks in metric bison

2020-05-13 Thread Jiri Olsa
On Tue, May 12, 2020 at 05:03:18PM -0700, Ian Rogers wrote: > Add a destructor for strings to reclaim memory in the event of errors. > Free the ID given for a lookup, it was previously strdup-ed in the lex > code. > > Reviewed-by: Andi Kleen > Signed-off-by: Ian Rogers Acked-by: Jiri Olsa tha

[PATCH] perf expr: Fix memory leaks in metric bison

2020-05-12 Thread Ian Rogers
Add a destructor for strings to reclaim memory in the event of errors. Free the ID given for a lookup, it was previously strdup-ed in the lex code. Reviewed-by: Andi Kleen Signed-off-by: Ian Rogers --- tools/perf/util/expr.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/perf/util