Re: [PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-25 Thread Jiri Olsa
On Sat, Feb 23, 2019 at 12:18:18PM +0900, Namhyung Kim wrote: > Hi, > > On Fri, Feb 22, 2019 at 1:29 AM Jiri Olsa wrote: > > > > On Thu, Feb 21, 2019 at 02:53:20PM +0100, Jonas Rabenstein wrote: > > > On Thu, Feb 21, 2019 at 01:39:09PM +0100, Jiri Olsa wrote: > > > > On Thu, Feb 21, 2019 at 01:23

Re: [PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-22 Thread Namhyung Kim
Hi, On Fri, Feb 22, 2019 at 1:29 AM Jiri Olsa wrote: > > On Thu, Feb 21, 2019 at 02:53:20PM +0100, Jonas Rabenstein wrote: > > On Thu, Feb 21, 2019 at 01:39:09PM +0100, Jiri Olsa wrote: > > > On Thu, Feb 21, 2019 at 01:23:06PM +0100, Jonas Rabenstein wrote: > > > > In __hists__add_entry the srcli

Re: [PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-21 Thread Jiri Olsa
On Thu, Feb 21, 2019 at 02:53:20PM +0100, Jonas Rabenstein wrote: > On Thu, Feb 21, 2019 at 01:39:09PM +0100, Jiri Olsa wrote: > > On Thu, Feb 21, 2019 at 01:23:06PM +0100, Jonas Rabenstein wrote: > > > In __hists__add_entry the srcline of the addr_location is duplicated > > > for the hist_entry. I

Re: [PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-21 Thread Jonas Rabenstein
On Thu, Feb 21, 2019 at 01:39:09PM +0100, Jiri Olsa wrote: > On Thu, Feb 21, 2019 at 01:23:06PM +0100, Jonas Rabenstein wrote: > > In __hists__add_entry the srcline of the addr_location is duplicated > > for the hist_entry. If hists__findnew_entry returns an already existing > > hist_entry the srcl

Re: [PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-21 Thread Jiri Olsa
On Thu, Feb 21, 2019 at 01:23:06PM +0100, Jonas Rabenstein wrote: > In __hists__add_entry the srcline of the addr_location is duplicated > for the hist_entry. If hists__findnew_entry returns an already existing > hist_entry the srcline has to be freed again as no further reference to > that duplica

[PATCH] perf hist: fix memory leak if histogram entry is reused

2019-02-21 Thread Jonas Rabenstein
In __hists__add_entry the srcline of the addr_location is duplicated for the hist_entry. If hists__findnew_entry returns an already existing hist_entry the srcline has to be freed again as no further reference to that duplicated srcline would exists anymore. Signed-off-by: Jonas Rabenstein --- t