Messages in this thread | | | Date | Tue, 25 Sep 2012 08:12:03 -0300 | From | Arnaldo Carvalho de Melo <> | Subject | Re: [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
| |