lkml.org 
[lkml]   [2015]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/3] tools lib traceevent: add priv field to struct format_field.
On Fri, Jan 30, 2015 at 09:17:19AM -0500, Steven Rostedt wrote:
> On Mon, 26 Jan 2015 18:38:23 +0800
> Wang Nan <wangnan0@huawei.com> wrote:
>
>
> > diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> > index cf3a44b..5f76003 100644
> > --- a/tools/lib/traceevent/event-parse.c
> > +++ b/tools/lib/traceevent/event-parse.c
> > @@ -5909,6 +5909,8 @@ static void free_format_fields(struct format_field *field)
> > free(field->type);
> > free(field->name);
> > free(field);
> > + if (field->destroy_priv)
> > + field->destroy_priv(field);
>
> I think you want to call field->destroy_priv() *before* you free field.

argh.. missed that :-\ will fix

thanks,
jirka

>
> -- Steve
>
> > field = next;
> > }
> > }


\
 
 \ /
  Last update: 2015-01-30 15:41    [W:0.127 / U:6.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site