lkml.org 
[lkml]   [2012]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 27/30] tools lib traceevent: Carve out events format parsing routine
Em Tue, Sep 25, 2012 at 01:15:05PM +0900, Namhyung Kim escreveu:
> On Mon, 24 Sep 2012 12:59:41 -0300, Arnaldo Carvalho de Melo wrote:
> > + if (add_event(pevent, event))
> > + goto event_add_failed;

> It seems we should set the 'ret' to a proper pevent_errno -
> PEVENT_ERRNO__MEM_ALLOC_FAILED.

> > +event_add_failed:
> > + free(event->system);
> > + free(event->name);
> > + free(event);
>
> At this point, the 'event' also has fields and format information and
> they all need to be freed. Looks like calling pevent_free_format()
> would be the right thing IMHO.

Right, care to send a patch?

This patch even exported pevent_free_format, used in the next patch in
this series, should've used it here :-\

- Arnaldo


\
 
 \ /
  Last update: 2012-09-25 13:41    [W:0.083 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site