lkml.org 
[lkml]   [2014]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 03/21] perf hists: Add support for accumulated stat of hist entry
Date
On Sun, 5 Jan 2014 17:26:50 +0100, Jiri Olsa wrote:
> On Tue, Dec 24, 2013 at 05:22:09PM +0900, Namhyung Kim wrote:
>> @@ -295,6 +306,7 @@ static struct hist_entry *hist_entry__new(struct hist_entry *template)
>> */
>> he->branch_info = malloc(sizeof(*he->branch_info));
>> if (he->branch_info == NULL) {
>> + free(he->stat_acc);
>
> probably not big deal but above free should be under
> symbol_conf.cumulate_callchain check..

The he->stat_acc will be NULL if !symbol_conf.cumulate_callchain so it's
safe to call free().

And I'll add the call to free() into hist_entry__free() anyway.

Thanks,
Namhyung


\
 
 \ /
  Last update: 2014-01-06 09:41    [W:0.179 / U:1.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site